Merge "C# CustomView Implementation (C++ wrappers, manual bindings, C# wrappers)...
[platform/core/uifw/dali-toolkit.git] / plugins / dali-swig / automatic / csharp / Scrollable.cs
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 3.0.9
6 //
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
10
11 namespace Dali {
12
13 using System;
14 using System.Runtime.InteropServices;
15
16
17 public class Scrollable : View {
18   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
19
20   internal Scrollable(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Scrollable_SWIGUpcast(cPtr), cMemoryOwn) {
21     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
22   }
23
24   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Scrollable obj) {
25     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
26   }
27
28   ~Scrollable() {
29     Dispose();
30   }
31
32   public override void Dispose() {
33     lock(this) {
34       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
35         if (swigCMemOwn) {
36           swigCMemOwn = false;
37           NDalicPINVOKE.delete_Scrollable(swigCPtr);
38         }
39         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
40       }
41       global::System.GC.SuppressFinalize(this);
42       base.Dispose();
43     }
44   }
45
46
47 public class StartedEventArgs : EventArgs
48 {
49    private Vector2 _vector2;
50
51    public Vector2 Vector2
52    {
53       get
54       {
55          return _vector2;
56       }
57       set
58       {
59          _vector2 = value;
60       }
61    }
62 }
63
64 public class UpdatedEventArgs : EventArgs
65 {
66    private Vector2 _vector2;
67
68    public Vector2 Vector2
69    {
70       get
71       {
72          return _vector2;
73       }
74       set
75       {
76          _vector2 = value;
77       }
78    }
79 }
80
81 public class CompletedEventArgs : EventArgs
82 {
83    private Vector2 _vector2;
84
85    public Vector2 Vector2
86    {
87       get
88       {
89          return _vector2;
90       }
91       set
92       {
93          _vector2 = value;
94       }
95    }
96 }
97
98   [UnmanagedFunctionPointer(CallingConvention.StdCall)]
99   private delegate void StartedCallbackDelegate(IntPtr vector2);
100   private DaliEventHandler<object,StartedEventArgs> _scrollableStartedEventHandler;
101   private StartedCallbackDelegate _scrollableStartedCallbackDelegate;
102
103   [UnmanagedFunctionPointer(CallingConvention.StdCall)]
104   private delegate void UpdatedCallbackDelegate(IntPtr vector2);
105   private DaliEventHandler<object,UpdatedEventArgs> _scrollableUpdatedEventHandler;
106   private UpdatedCallbackDelegate _scrollableUpdatedCallbackDelegate;
107
108   [UnmanagedFunctionPointer(CallingConvention.StdCall)]
109   private delegate void CompletedCallbackDelegate(IntPtr vector2);
110   private DaliEventHandler<object,CompletedEventArgs> _scrollableCompletedEventHandler;
111   private CompletedCallbackDelegate _scrollableCompletedCallbackDelegate;
112
113   public event DaliEventHandler<object,StartedEventArgs> ScrollStarted
114   {
115      add
116      {
117         lock(this)
118         {
119            // Restricted to only one listener
120            if (_scrollableStartedEventHandler == null)
121            {
122               _scrollableStartedEventHandler += value;
123
124               _scrollableStartedCallbackDelegate = new StartedCallbackDelegate(OnStarted);
125               this.ScrollStartedSignal().Connect(_scrollableStartedCallbackDelegate);
126            }
127         }
128      }
129
130      remove
131      {
132         lock(this)
133         {
134            if (_scrollableStartedEventHandler != null)
135            {
136               this.ScrollStartedSignal().Disconnect(_scrollableStartedCallbackDelegate);
137            }
138
139            _scrollableStartedEventHandler -= value;
140         }
141      }
142   }
143
144  private void OnStarted(IntPtr vector2)
145   {
146    StartedEventArgs e = new StartedEventArgs();
147
148    // Populate all members of "e" (StartedEventArgs) with real data
149    e.Vector2 = Dali.Vector2.GetVector2FromPtr(vector2);
150
151    if (_scrollableStartedEventHandler != null)
152    {
153       //here we send all data to user event handlers
154       _scrollableStartedEventHandler(this, e);
155    }
156
157   }
158
159   public event DaliEventHandler<object,UpdatedEventArgs> ScrollUpdated
160   {
161      add
162      {
163         lock(this)
164         {
165            // Restricted to only one listener
166            if (_scrollableUpdatedEventHandler == null)
167            {
168               _scrollableUpdatedEventHandler += value;
169
170               _scrollableUpdatedCallbackDelegate = new UpdatedCallbackDelegate(OnUpdated);
171               this.ScrollUpdatedSignal().Connect(_scrollableUpdatedCallbackDelegate);
172            }
173         }
174      }
175
176      remove
177      {
178         lock(this)
179         {
180            if (_scrollableUpdatedEventHandler != null)
181            {
182               this.ScrollUpdatedSignal().Disconnect(_scrollableUpdatedCallbackDelegate);
183            }
184
185            _scrollableUpdatedEventHandler -= value;
186         }
187      }
188   }
189
190  private void OnUpdated(IntPtr vector2)
191   {
192    UpdatedEventArgs e = new UpdatedEventArgs();
193
194    // Populate all members of "e" (UpdatedEventArgs) with real data
195    e.Vector2 = Dali.Vector2.GetVector2FromPtr(vector2);
196
197    if (_scrollableUpdatedEventHandler != null)
198    {
199       //here we send all data to user event handlers
200       _scrollableUpdatedEventHandler(this, e);
201    }
202
203   }
204
205   public event DaliEventHandler<object,CompletedEventArgs> ScrollCompleted
206   {
207      add
208      {
209         lock(this)
210         {
211            // Restricted to only one listener
212            if (_scrollableCompletedEventHandler == null)
213            {
214               _scrollableCompletedEventHandler += value;
215
216               _scrollableCompletedCallbackDelegate = new CompletedCallbackDelegate(OnCompleted);
217               this.ScrollCompletedSignal().Connect(_scrollableCompletedCallbackDelegate);
218            }
219         }
220      }
221
222      remove
223      {
224         lock(this)
225         {
226            if (_scrollableCompletedEventHandler != null)
227            {
228               this.ScrollCompletedSignal().Disconnect(_scrollableCompletedCallbackDelegate);
229            }
230
231            _scrollableCompletedEventHandler -= value;
232         }
233      }
234   }
235
236  private void OnCompleted(IntPtr vector2)
237   {
238    CompletedEventArgs e = new CompletedEventArgs();
239
240    // Populate all members of "e" (CompletedEventArgs) with real data
241    e.Vector2 = Dali.Vector2.GetVector2FromPtr(vector2);
242
243    if (_scrollableCompletedEventHandler != null)
244    {
245       //here we send all data to user event handlers
246       _scrollableCompletedEventHandler(this, e);
247    }
248
249   }
250
251
252   public class Property : global::System.IDisposable {
253     private global::System.Runtime.InteropServices.HandleRef swigCPtr;
254     protected bool swigCMemOwn;
255   
256     internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) {
257       swigCMemOwn = cMemoryOwn;
258       swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
259     }
260   
261     internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) {
262       return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
263     }
264   
265     ~Property() {
266       Dispose();
267     }
268   
269     public virtual void Dispose() {
270       lock(this) {
271         if (swigCPtr.Handle != global::System.IntPtr.Zero) {
272           if (swigCMemOwn) {
273             swigCMemOwn = false;
274             NDalicPINVOKE.delete_Scrollable_Property(swigCPtr);
275           }
276           swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
277         }
278         global::System.GC.SuppressFinalize(this);
279       }
280     }
281   
282     public Property() : this(NDalicPINVOKE.new_Scrollable_Property(), true) {
283       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
284     }
285   
286     public static readonly int OVERSHOOT_EFFECT_COLOR = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_EFFECT_COLOR_get();
287     public static readonly int OVERSHOOT_ANIMATION_SPEED = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_ANIMATION_SPEED_get();
288     public static readonly int OVERSHOOT_ENABLED = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_ENABLED_get();
289     public static readonly int OVERSHOOT_SIZE = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_SIZE_get();
290     public static readonly int SCROLL_TO_ALPHA_FUNCTION = NDalicPINVOKE.Scrollable_Property_SCROLL_TO_ALPHA_FUNCTION_get();
291     public static readonly int SCROLL_RELATIVE_POSITION = NDalicPINVOKE.Scrollable_Property_SCROLL_RELATIVE_POSITION_get();
292     public static readonly int SCROLL_POSITION_MIN = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_get();
293     public static readonly int SCROLL_POSITION_MIN_X = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_X_get();
294     public static readonly int SCROLL_POSITION_MIN_Y = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_Y_get();
295     public static readonly int SCROLL_POSITION_MAX = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_get();
296     public static readonly int SCROLL_POSITION_MAX_X = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_X_get();
297     public static readonly int SCROLL_POSITION_MAX_Y = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_Y_get();
298     public static readonly int CAN_SCROLL_VERTICAL = NDalicPINVOKE.Scrollable_Property_CAN_SCROLL_VERTICAL_get();
299     public static readonly int CAN_SCROLL_HORIZONTAL = NDalicPINVOKE.Scrollable_Property_CAN_SCROLL_HORIZONTAL_get();
300   
301   }
302
303   public Scrollable() : this(NDalicPINVOKE.new_Scrollable__SWIG_0(), true) {
304     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
305   }
306
307   public Scrollable(Scrollable handle) : this(NDalicPINVOKE.new_Scrollable__SWIG_1(Scrollable.getCPtr(handle)), true) {
308     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
309   }
310
311   public Scrollable Assign(Scrollable handle) {
312     Scrollable ret = new Scrollable(NDalicPINVOKE.Scrollable_Assign(swigCPtr, Scrollable.getCPtr(handle)), false);
313     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
314     return ret;
315   }
316
317   public new static Scrollable DownCast(BaseHandle handle) {
318     Scrollable ret = new Scrollable(NDalicPINVOKE.Scrollable_DownCast(BaseHandle.getCPtr(handle)), true);
319     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
320     return ret;
321   }
322
323   public bool IsOvershootEnabled() {
324     bool ret = NDalicPINVOKE.Scrollable_IsOvershootEnabled(swigCPtr);
325     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
326     return ret;
327   }
328
329   public void SetOvershootEnabled(bool enable) {
330     NDalicPINVOKE.Scrollable_SetOvershootEnabled(swigCPtr, enable);
331     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
332   }
333
334   public void SetOvershootEffectColor(Vector4 color) {
335     NDalicPINVOKE.Scrollable_SetOvershootEffectColor(swigCPtr, Vector4.getCPtr(color));
336     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
337   }
338
339   public Vector4 GetOvershootEffectColor() {
340     Vector4 ret = new Vector4(NDalicPINVOKE.Scrollable_GetOvershootEffectColor(swigCPtr), true);
341     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
342     return ret;
343   }
344
345   public void SetOvershootAnimationSpeed(float pixelsPerSecond) {
346     NDalicPINVOKE.Scrollable_SetOvershootAnimationSpeed(swigCPtr, pixelsPerSecond);
347     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
348   }
349
350   public float GetOvershootAnimationSpeed() {
351     float ret = NDalicPINVOKE.Scrollable_GetOvershootAnimationSpeed(swigCPtr);
352     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
353     return ret;
354   }
355
356   public ScrollableSignal ScrollStartedSignal() {
357     ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollStartedSignal(swigCPtr), false);
358     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
359     return ret;
360   }
361
362   public ScrollableSignal ScrollUpdatedSignal() {
363     ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollUpdatedSignal(swigCPtr), false);
364     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
365     return ret;
366   }
367
368   public ScrollableSignal ScrollCompletedSignal() {
369     ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollCompletedSignal(swigCPtr), false);
370     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
371     return ret;
372   }
373
374   public enum PropertyRange {
375     PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
376     PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX+1000,
377     ANIMATABLE_PROPERTY_START_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX,
378     ANIMATABLE_PROPERTY_END_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX+1000
379   }
380
381   public Vector4 OvershootEffectColor 
382   { 
383     get 
384     {
385       Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
386       GetProperty( Scrollable.Property.OVERSHOOT_EFFECT_COLOR).Get(  temp );
387       return temp;
388     }
389     set 
390     { 
391       SetProperty( Scrollable.Property.OVERSHOOT_EFFECT_COLOR, new Dali.Property.Value( value ) );
392     }
393   }
394   public float OvershootAnimationSpeed 
395   { 
396     get 
397     {
398       float temp = 0.0f;
399       GetProperty( Scrollable.Property.OVERSHOOT_ANIMATION_SPEED).Get( ref temp );
400       return temp;
401     }
402     set 
403     { 
404       SetProperty( Scrollable.Property.OVERSHOOT_ANIMATION_SPEED, new Dali.Property.Value( value ) );
405     }
406   }
407   public bool OvershootEnabled 
408   { 
409     get 
410     {
411       bool temp = false;
412       GetProperty( Scrollable.Property.OVERSHOOT_ENABLED).Get( ref temp );
413       return temp;
414     }
415     set 
416     { 
417       SetProperty( Scrollable.Property.OVERSHOOT_ENABLED, new Dali.Property.Value( value ) );
418     }
419   }
420   public Vector2 OvershootSize 
421   { 
422     get 
423     {
424       Vector2 temp = new Vector2(0.0f,0.0f);
425       GetProperty( Scrollable.Property.OVERSHOOT_SIZE).Get(  temp );
426       return temp;
427     }
428     set 
429     { 
430       SetProperty( Scrollable.Property.OVERSHOOT_SIZE, new Dali.Property.Value( value ) );
431     }
432   }
433   public int ScrollToAlphaFunction 
434   { 
435     get 
436     {
437       int temp = 0;
438       GetProperty( Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION).Get( ref temp );
439       return temp;
440     }
441     set 
442     { 
443       SetProperty( Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION, new Dali.Property.Value( value ) );
444     }
445   }
446   public Vector2 ScrollRelativePosition 
447   { 
448     get 
449     {
450       Vector2 temp = new Vector2(0.0f,0.0f);
451       GetProperty( Scrollable.Property.SCROLL_RELATIVE_POSITION).Get(  temp );
452       return temp;
453     }
454     set 
455     { 
456       SetProperty( Scrollable.Property.SCROLL_RELATIVE_POSITION, new Dali.Property.Value( value ) );
457     }
458   }
459   public Vector2 ScrollPositionMin 
460   { 
461     get 
462     {
463       Vector2 temp = new Vector2(0.0f,0.0f);
464       GetProperty( Scrollable.Property.SCROLL_POSITION_MIN).Get(  temp );
465       return temp;
466     }
467     set 
468     { 
469       SetProperty( Scrollable.Property.SCROLL_POSITION_MIN, new Dali.Property.Value( value ) );
470     }
471   }
472   public Vector2 ScrollPositionMax 
473   { 
474     get 
475     {
476       Vector2 temp = new Vector2(0.0f,0.0f);
477       GetProperty( Scrollable.Property.SCROLL_POSITION_MAX).Get(  temp );
478       return temp;
479     }
480     set 
481     { 
482       SetProperty( Scrollable.Property.SCROLL_POSITION_MAX, new Dali.Property.Value( value ) );
483     }
484   }
485   public bool CanScrollVertical 
486   { 
487     get 
488     {
489       bool temp = false;
490       GetProperty( Scrollable.Property.CAN_SCROLL_VERTICAL).Get( ref temp );
491       return temp;
492     }
493     set 
494     { 
495       SetProperty( Scrollable.Property.CAN_SCROLL_VERTICAL, new Dali.Property.Value( value ) );
496     }
497   }
498   public bool CanScrollHorizontal 
499   { 
500     get 
501     {
502       bool temp = false;
503       GetProperty( Scrollable.Property.CAN_SCROLL_HORIZONTAL).Get( ref temp );
504       return temp;
505     }
506     set 
507     { 
508       SetProperty( Scrollable.Property.CAN_SCROLL_HORIZONTAL, new Dali.Property.Value( value ) );
509     }
510   }
511
512 }
513
514 }