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