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