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