manual bind tts player for nui
[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             // By default, we do not want the position to use the anchor point
26             PositionUsesAnchorPoint = false;
27         }
28
29         internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Scrollable obj)
30         {
31             return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
32         }
33
34         protected override void Dispose(DisposeTypes type)
35         {
36             if (disposed)
37             {
38                 return;
39             }
40
41             if (type == DisposeTypes.Explicit)
42             {
43                 //Called by User
44                 //Release your own managed resources here.
45                 //You should release all of your own disposable objects here.
46
47             }
48
49             //Release your own unmanaged resources here.
50             //You should not access any managed member here except static instance.
51             //because the execution order of Finalizes is non-deterministic.
52
53             //Unreference this from if a static instance refer to this. 
54             ViewRegistry.UnregisterView(this);
55
56             if (swigCPtr.Handle != global::System.IntPtr.Zero)
57             {
58                 if (swigCMemOwn)
59                 {
60                     swigCMemOwn = false;
61                     NDalicPINVOKE.delete_Scrollable(swigCPtr);
62                 }
63                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
64             }
65
66             base.Dispose(type);
67         }
68
69         public class StartedEventArgs : EventArgs
70         {
71             private Vector2 _vector2;
72
73             public Vector2 Vector2
74             {
75                 get
76                 {
77                     return _vector2;
78                 }
79                 set
80                 {
81                     _vector2 = value;
82                 }
83             }
84         }
85
86         public class UpdatedEventArgs : EventArgs
87         {
88             private Vector2 _vector2;
89
90             public Vector2 Vector2
91             {
92                 get
93                 {
94                     return _vector2;
95                 }
96                 set
97                 {
98                     _vector2 = value;
99                 }
100             }
101         }
102
103         public class CompletedEventArgs : EventArgs
104         {
105             private Vector2 _vector2;
106
107             public Vector2 Vector2
108             {
109                 get
110                 {
111                     return _vector2;
112                 }
113                 set
114                 {
115                     _vector2 = value;
116                 }
117             }
118         }
119
120         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
121         private delegate void StartedCallbackDelegate(IntPtr vector2);
122         private DaliEventHandler<object, StartedEventArgs> _scrollableStartedEventHandler;
123         private StartedCallbackDelegate _scrollableStartedCallbackDelegate;
124
125         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
126         private delegate void UpdatedCallbackDelegate(IntPtr vector2);
127         private DaliEventHandler<object, UpdatedEventArgs> _scrollableUpdatedEventHandler;
128         private UpdatedCallbackDelegate _scrollableUpdatedCallbackDelegate;
129
130         [UnmanagedFunctionPointer(CallingConvention.StdCall)]
131         private delegate void CompletedCallbackDelegate(IntPtr vector2);
132         private DaliEventHandler<object, CompletedEventArgs> _scrollableCompletedEventHandler;
133         private CompletedCallbackDelegate _scrollableCompletedCallbackDelegate;
134
135         public event DaliEventHandler<object, StartedEventArgs> ScrollStarted
136         {
137             add
138             {
139                 lock (this)
140                 {
141                     // Restricted to only one listener
142                     if (_scrollableStartedEventHandler == null)
143                     {
144                         _scrollableStartedEventHandler += value;
145
146                         _scrollableStartedCallbackDelegate = new StartedCallbackDelegate(OnStarted);
147                         this.ScrollStartedSignal().Connect(_scrollableStartedCallbackDelegate);
148                     }
149                 }
150             }
151
152             remove
153             {
154                 lock (this)
155                 {
156                     if (_scrollableStartedEventHandler != null)
157                     {
158                         this.ScrollStartedSignal().Disconnect(_scrollableStartedCallbackDelegate);
159                     }
160
161                     _scrollableStartedEventHandler -= value;
162                 }
163             }
164         }
165
166         private void OnStarted(IntPtr vector2)
167         {
168             StartedEventArgs e = new StartedEventArgs();
169
170             // Populate all members of "e" (StartedEventArgs) with real data
171             e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2);
172
173             if (_scrollableStartedEventHandler != null)
174             {
175                 //here we send all data to user event handlers
176                 _scrollableStartedEventHandler(this, e);
177             }
178
179         }
180
181         public event DaliEventHandler<object, UpdatedEventArgs> ScrollUpdated
182         {
183             add
184             {
185                 lock (this)
186                 {
187                     // Restricted to only one listener
188                     if (_scrollableUpdatedEventHandler == null)
189                     {
190                         _scrollableUpdatedEventHandler += value;
191
192                         _scrollableUpdatedCallbackDelegate = new UpdatedCallbackDelegate(OnUpdated);
193                         this.ScrollUpdatedSignal().Connect(_scrollableUpdatedCallbackDelegate);
194                     }
195                 }
196             }
197
198             remove
199             {
200                 lock (this)
201                 {
202                     if (_scrollableUpdatedEventHandler != null)
203                     {
204                         this.ScrollUpdatedSignal().Disconnect(_scrollableUpdatedCallbackDelegate);
205                     }
206
207                     _scrollableUpdatedEventHandler -= value;
208                 }
209             }
210         }
211
212         private void OnUpdated(IntPtr vector2)
213         {
214             UpdatedEventArgs e = new UpdatedEventArgs();
215
216             // Populate all members of "e" (UpdatedEventArgs) with real data
217             e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2);
218
219             if (_scrollableUpdatedEventHandler != null)
220             {
221                 //here we send all data to user event handlers
222                 _scrollableUpdatedEventHandler(this, e);
223             }
224
225         }
226
227         public event DaliEventHandler<object, CompletedEventArgs> ScrollCompleted
228         {
229             add
230             {
231                 lock (this)
232                 {
233                     // Restricted to only one listener
234                     if (_scrollableCompletedEventHandler == null)
235                     {
236                         _scrollableCompletedEventHandler += value;
237
238                         _scrollableCompletedCallbackDelegate = new CompletedCallbackDelegate(OnCompleted);
239                         this.ScrollCompletedSignal().Connect(_scrollableCompletedCallbackDelegate);
240                     }
241                 }
242             }
243
244             remove
245             {
246                 lock (this)
247                 {
248                     if (_scrollableCompletedEventHandler != null)
249                     {
250                         this.ScrollCompletedSignal().Disconnect(_scrollableCompletedCallbackDelegate);
251                     }
252
253                     _scrollableCompletedEventHandler -= value;
254                 }
255             }
256         }
257
258         private void OnCompleted(IntPtr vector2)
259         {
260             CompletedEventArgs e = new CompletedEventArgs();
261
262             // Populate all members of "e" (CompletedEventArgs) with real data
263             e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2);
264
265             if (_scrollableCompletedEventHandler != null)
266             {
267                 //here we send all data to user event handlers
268                 _scrollableCompletedEventHandler(this, e);
269             }
270
271         }
272
273
274         public class Property : global::System.IDisposable
275         {
276             private global::System.Runtime.InteropServices.HandleRef swigCPtr;
277             protected bool swigCMemOwn;
278
279             internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)
280             {
281                 swigCMemOwn = cMemoryOwn;
282                 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
283             }
284
285             internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
286             {
287                 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
288             }
289
290             //A Flag to check who called Dispose(). (By User or DisposeQueue)
291             private bool isDisposeQueued = false;
292             //A Flat to check if it is already disposed.
293             protected bool disposed = false;
294
295
296             ~Property()
297             {
298                 if (!isDisposeQueued)
299                 {
300                     isDisposeQueued = true;
301                     DisposeQueue.Instance.Add(this);
302                 }
303             }
304
305             public void Dispose()
306             {
307                 //Throw excpetion if Dispose() is called in separate thread.
308                 if (!Window.IsInstalled())
309                 {
310                     throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
311                 }
312
313                 if (isDisposeQueued)
314                 {
315                     Dispose(DisposeTypes.Implicit);
316                 }
317                 else
318                 {
319                     Dispose(DisposeTypes.Explicit);
320                     System.GC.SuppressFinalize(this);
321                 }
322             }
323
324             protected virtual void Dispose(DisposeTypes type)
325             {
326                 if (disposed)
327                 {
328                     return;
329                 }
330
331                 if (type == DisposeTypes.Explicit)
332                 {
333                     //Called by User
334                     //Release your own managed resources here.
335                     //You should release all of your own disposable objects here.
336
337                 }
338
339                 //Release your own unmanaged resources here.
340                 //You should not access any managed member here except static instance.
341                 //because the execution order of Finalizes is non-deterministic.
342
343                 if (swigCPtr.Handle != global::System.IntPtr.Zero)
344                 {
345                     if (swigCMemOwn)
346                     {
347                         swigCMemOwn = false;
348                         NDalicPINVOKE.delete_Scrollable_Property(swigCPtr);
349                     }
350                     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
351                 }
352
353                 disposed = true;
354             }
355
356             public Property() : this(NDalicPINVOKE.new_Scrollable_Property(), true)
357             {
358                 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
359             }
360
361             public static readonly int OVERSHOOT_EFFECT_COLOR = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_EFFECT_COLOR_get();
362             public static readonly int OVERSHOOT_ANIMATION_SPEED = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_ANIMATION_SPEED_get();
363             public static readonly int OVERSHOOT_ENABLED = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_ENABLED_get();
364             public static readonly int OVERSHOOT_SIZE = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_SIZE_get();
365             public static readonly int SCROLL_TO_ALPHA_FUNCTION = NDalicPINVOKE.Scrollable_Property_SCROLL_TO_ALPHA_FUNCTION_get();
366             public static readonly int SCROLL_RELATIVE_POSITION = NDalicPINVOKE.Scrollable_Property_SCROLL_RELATIVE_POSITION_get();
367             public static readonly int SCROLL_POSITION_MIN = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_get();
368             public static readonly int SCROLL_POSITION_MIN_X = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_X_get();
369             public static readonly int SCROLL_POSITION_MIN_Y = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_Y_get();
370             public static readonly int SCROLL_POSITION_MAX = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_get();
371             public static readonly int SCROLL_POSITION_MAX_X = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_X_get();
372             public static readonly int SCROLL_POSITION_MAX_Y = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_Y_get();
373             public static readonly int CAN_SCROLL_VERTICAL = NDalicPINVOKE.Scrollable_Property_CAN_SCROLL_VERTICAL_get();
374             public static readonly int CAN_SCROLL_HORIZONTAL = NDalicPINVOKE.Scrollable_Property_CAN_SCROLL_HORIZONTAL_get();
375
376         }
377
378         public Scrollable() : this(NDalicPINVOKE.new_Scrollable__SWIG_0(), true)
379         {
380             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
381         }
382
383         public Scrollable(Scrollable handle) : this(NDalicPINVOKE.new_Scrollable__SWIG_1(Scrollable.getCPtr(handle)), true)
384         {
385             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
386         }
387
388         public Scrollable Assign(Scrollable handle)
389         {
390             Scrollable ret = new Scrollable(NDalicPINVOKE.Scrollable_Assign(swigCPtr, Scrollable.getCPtr(handle)), false);
391             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
392             return ret;
393         }
394
395         public new static Scrollable DownCast(BaseHandle handle)
396         {
397             Scrollable ret = new Scrollable(NDalicPINVOKE.Scrollable_DownCast(BaseHandle.getCPtr(handle)), true);
398             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
399             return ret;
400         }
401
402         public bool IsOvershootEnabled()
403         {
404             bool ret = NDalicPINVOKE.Scrollable_IsOvershootEnabled(swigCPtr);
405             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
406             return ret;
407         }
408
409         public void SetOvershootEnabled(bool enable)
410         {
411             NDalicPINVOKE.Scrollable_SetOvershootEnabled(swigCPtr, enable);
412             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
413         }
414
415         public void SetOvershootEffectColor(Vector4 color)
416         {
417             NDalicPINVOKE.Scrollable_SetOvershootEffectColor(swigCPtr, Vector4.getCPtr(color));
418             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
419         }
420
421         public Vector4 GetOvershootEffectColor()
422         {
423             Vector4 ret = new Vector4(NDalicPINVOKE.Scrollable_GetOvershootEffectColor(swigCPtr), true);
424             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
425             return ret;
426         }
427
428         public void SetOvershootAnimationSpeed(float pixelsPerSecond)
429         {
430             NDalicPINVOKE.Scrollable_SetOvershootAnimationSpeed(swigCPtr, pixelsPerSecond);
431             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
432         }
433
434         public float GetOvershootAnimationSpeed()
435         {
436             float ret = NDalicPINVOKE.Scrollable_GetOvershootAnimationSpeed(swigCPtr);
437             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
438             return ret;
439         }
440
441         internal ScrollableSignal ScrollStartedSignal()
442         {
443             ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollStartedSignal(swigCPtr), false);
444             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
445             return ret;
446         }
447
448         internal ScrollableSignal ScrollUpdatedSignal()
449         {
450             ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollUpdatedSignal(swigCPtr), false);
451             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
452             return ret;
453         }
454
455         internal ScrollableSignal ScrollCompletedSignal()
456         {
457             ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollCompletedSignal(swigCPtr), false);
458             if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
459             return ret;
460         }
461
462         public enum PropertyRange
463         {
464             PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
465             PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX + 1000,
466             ANIMATABLE_PROPERTY_START_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX,
467             ANIMATABLE_PROPERTY_END_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX + 1000
468         }
469
470         public Vector4 OvershootEffectColor
471         {
472             get
473             {
474                 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
475                 GetProperty(Scrollable.Property.OVERSHOOT_EFFECT_COLOR).Get(temp);
476                 return temp;
477             }
478             set
479             {
480                 SetProperty(Scrollable.Property.OVERSHOOT_EFFECT_COLOR, new Tizen.NUI.PropertyValue(value));
481             }
482         }
483         public float OvershootAnimationSpeed
484         {
485             get
486             {
487                 float temp = 0.0f;
488                 GetProperty(Scrollable.Property.OVERSHOOT_ANIMATION_SPEED).Get(ref temp);
489                 return temp;
490             }
491             set
492             {
493                 SetProperty(Scrollable.Property.OVERSHOOT_ANIMATION_SPEED, new Tizen.NUI.PropertyValue(value));
494             }
495         }
496         public bool OvershootEnabled
497         {
498             get
499             {
500                 bool temp = false;
501                 GetProperty(Scrollable.Property.OVERSHOOT_ENABLED).Get(ref temp);
502                 return temp;
503             }
504             set
505             {
506                 SetProperty(Scrollable.Property.OVERSHOOT_ENABLED, new Tizen.NUI.PropertyValue(value));
507             }
508         }
509         public Vector2 OvershootSize
510         {
511             get
512             {
513                 Vector2 temp = new Vector2(0.0f, 0.0f);
514                 GetProperty(Scrollable.Property.OVERSHOOT_SIZE).Get(temp);
515                 return temp;
516             }
517             set
518             {
519                 SetProperty(Scrollable.Property.OVERSHOOT_SIZE, new Tizen.NUI.PropertyValue(value));
520             }
521         }
522         public int ScrollToAlphaFunction
523         {
524             get
525             {
526                 int temp = 0;
527                 GetProperty(Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION).Get(ref temp);
528                 return temp;
529             }
530             set
531             {
532                 SetProperty(Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION, new Tizen.NUI.PropertyValue(value));
533             }
534         }
535         public Vector2 ScrollRelativePosition
536         {
537             get
538             {
539                 Vector2 temp = new Vector2(0.0f, 0.0f);
540                 GetProperty(Scrollable.Property.SCROLL_RELATIVE_POSITION).Get(temp);
541                 return temp;
542             }
543             set
544             {
545                 SetProperty(Scrollable.Property.SCROLL_RELATIVE_POSITION, new Tizen.NUI.PropertyValue(value));
546             }
547         }
548         public Vector2 ScrollPositionMin
549         {
550             get
551             {
552                 Vector2 temp = new Vector2(0.0f, 0.0f);
553                 GetProperty(Scrollable.Property.SCROLL_POSITION_MIN).Get(temp);
554                 return temp;
555             }
556             set
557             {
558                 SetProperty(Scrollable.Property.SCROLL_POSITION_MIN, new Tizen.NUI.PropertyValue(value));
559             }
560         }
561         public Vector2 ScrollPositionMax
562         {
563             get
564             {
565                 Vector2 temp = new Vector2(0.0f, 0.0f);
566                 GetProperty(Scrollable.Property.SCROLL_POSITION_MAX).Get(temp);
567                 return temp;
568             }
569             set
570             {
571                 SetProperty(Scrollable.Property.SCROLL_POSITION_MAX, new Tizen.NUI.PropertyValue(value));
572             }
573         }
574         public bool CanScrollVertical
575         {
576             get
577             {
578                 bool temp = false;
579                 GetProperty(Scrollable.Property.CAN_SCROLL_VERTICAL).Get(ref temp);
580                 return temp;
581             }
582             set
583             {
584                 SetProperty(Scrollable.Property.CAN_SCROLL_VERTICAL, new Tizen.NUI.PropertyValue(value));
585             }
586         }
587         public bool CanScrollHorizontal
588         {
589             get
590             {
591                 bool temp = false;
592                 GetProperty(Scrollable.Property.CAN_SCROLL_HORIZONTAL).Get(ref temp);
593                 return temp;
594             }
595             set
596             {
597                 SetProperty(Scrollable.Property.CAN_SCROLL_HORIZONTAL, new Tizen.NUI.PropertyValue(value));
598             }
599         }
600
601     }
602
603 }