1 //------------------------------------------------------------------------------
4 // This file was automatically generated by SWIG (http://www.swig.org).
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
15 using System.Runtime.InteropServices;
16 using Tizen.NUI.BaseComponents;
18 public class Scrollable : View
20 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
22 internal Scrollable(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Scrollable_SWIGUpcast(cPtr), cMemoryOwn)
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;
29 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Scrollable obj)
31 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
34 protected override void Dispose(DisposeTypes type)
41 if (type == DisposeTypes.Explicit)
44 //Release your own managed resources here.
45 //You should release all of your own disposable objects here.
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.
53 //Unreference this from if a static instance refer to this.
54 ViewRegistry.UnregisterView(this);
56 if (swigCPtr.Handle != global::System.IntPtr.Zero)
61 NDalicPINVOKE.delete_Scrollable(swigCPtr);
63 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
69 public class StartedEventArgs : EventArgs
71 private Vector2 _vector2;
73 public Vector2 Vector2
86 public class UpdatedEventArgs : EventArgs
88 private Vector2 _vector2;
90 public Vector2 Vector2
103 public class CompletedEventArgs : EventArgs
105 private Vector2 _vector2;
107 public Vector2 Vector2
120 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
121 private delegate void StartedCallbackDelegate(IntPtr vector2);
122 private DaliEventHandler<object, StartedEventArgs> _scrollableStartedEventHandler;
123 private StartedCallbackDelegate _scrollableStartedCallbackDelegate;
125 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
126 private delegate void UpdatedCallbackDelegate(IntPtr vector2);
127 private DaliEventHandler<object, UpdatedEventArgs> _scrollableUpdatedEventHandler;
128 private UpdatedCallbackDelegate _scrollableUpdatedCallbackDelegate;
130 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
131 private delegate void CompletedCallbackDelegate(IntPtr vector2);
132 private DaliEventHandler<object, CompletedEventArgs> _scrollableCompletedEventHandler;
133 private CompletedCallbackDelegate _scrollableCompletedCallbackDelegate;
135 public event DaliEventHandler<object, StartedEventArgs> ScrollStarted
141 // Restricted to only one listener
142 if (_scrollableStartedEventHandler == null)
144 _scrollableStartedEventHandler += value;
146 _scrollableStartedCallbackDelegate = new StartedCallbackDelegate(OnStarted);
147 this.ScrollStartedSignal().Connect(_scrollableStartedCallbackDelegate);
156 if (_scrollableStartedEventHandler != null)
158 this.ScrollStartedSignal().Disconnect(_scrollableStartedCallbackDelegate);
161 _scrollableStartedEventHandler -= value;
166 private void OnStarted(IntPtr vector2)
168 StartedEventArgs e = new StartedEventArgs();
170 // Populate all members of "e" (StartedEventArgs) with real data
171 e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2);
173 if (_scrollableStartedEventHandler != null)
175 //here we send all data to user event handlers
176 _scrollableStartedEventHandler(this, e);
181 public event DaliEventHandler<object, UpdatedEventArgs> ScrollUpdated
187 // Restricted to only one listener
188 if (_scrollableUpdatedEventHandler == null)
190 _scrollableUpdatedEventHandler += value;
192 _scrollableUpdatedCallbackDelegate = new UpdatedCallbackDelegate(OnUpdated);
193 this.ScrollUpdatedSignal().Connect(_scrollableUpdatedCallbackDelegate);
202 if (_scrollableUpdatedEventHandler != null)
204 this.ScrollUpdatedSignal().Disconnect(_scrollableUpdatedCallbackDelegate);
207 _scrollableUpdatedEventHandler -= value;
212 private void OnUpdated(IntPtr vector2)
214 UpdatedEventArgs e = new UpdatedEventArgs();
216 // Populate all members of "e" (UpdatedEventArgs) with real data
217 e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2);
219 if (_scrollableUpdatedEventHandler != null)
221 //here we send all data to user event handlers
222 _scrollableUpdatedEventHandler(this, e);
227 public event DaliEventHandler<object, CompletedEventArgs> ScrollCompleted
233 // Restricted to only one listener
234 if (_scrollableCompletedEventHandler == null)
236 _scrollableCompletedEventHandler += value;
238 _scrollableCompletedCallbackDelegate = new CompletedCallbackDelegate(OnCompleted);
239 this.ScrollCompletedSignal().Connect(_scrollableCompletedCallbackDelegate);
248 if (_scrollableCompletedEventHandler != null)
250 this.ScrollCompletedSignal().Disconnect(_scrollableCompletedCallbackDelegate);
253 _scrollableCompletedEventHandler -= value;
258 private void OnCompleted(IntPtr vector2)
260 CompletedEventArgs e = new CompletedEventArgs();
262 // Populate all members of "e" (CompletedEventArgs) with real data
263 e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2);
265 if (_scrollableCompletedEventHandler != null)
267 //here we send all data to user event handlers
268 _scrollableCompletedEventHandler(this, e);
274 public class Property : global::System.IDisposable
276 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
277 protected bool swigCMemOwn;
279 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn)
281 swigCMemOwn = cMemoryOwn;
282 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
285 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj)
287 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
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;
298 if (!isDisposeQueued)
300 isDisposeQueued = true;
301 DisposeQueue.Instance.Add(this);
305 public void Dispose()
307 //Throw excpetion if Dispose() is called in separate thread.
308 if (!Window.IsInstalled())
310 throw new System.InvalidOperationException("This API called from separate thread. This API must be called from MainThread.");
315 Dispose(DisposeTypes.Implicit);
319 Dispose(DisposeTypes.Explicit);
320 System.GC.SuppressFinalize(this);
324 protected virtual void Dispose(DisposeTypes type)
331 if (type == DisposeTypes.Explicit)
334 //Release your own managed resources here.
335 //You should release all of your own disposable objects here.
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.
343 if (swigCPtr.Handle != global::System.IntPtr.Zero)
348 NDalicPINVOKE.delete_Scrollable_Property(swigCPtr);
350 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
356 public Property() : this(NDalicPINVOKE.new_Scrollable_Property(), true)
358 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
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();
378 public Scrollable() : this(NDalicPINVOKE.new_Scrollable__SWIG_0(), true)
380 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
383 public Scrollable(Scrollable handle) : this(NDalicPINVOKE.new_Scrollable__SWIG_1(Scrollable.getCPtr(handle)), true)
385 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
388 public Scrollable Assign(Scrollable handle)
390 Scrollable ret = new Scrollable(NDalicPINVOKE.Scrollable_Assign(swigCPtr, Scrollable.getCPtr(handle)), false);
391 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
395 public new static Scrollable DownCast(BaseHandle handle)
397 Scrollable ret = new Scrollable(NDalicPINVOKE.Scrollable_DownCast(BaseHandle.getCPtr(handle)), true);
398 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
402 public bool IsOvershootEnabled()
404 bool ret = NDalicPINVOKE.Scrollable_IsOvershootEnabled(swigCPtr);
405 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
409 public void SetOvershootEnabled(bool enable)
411 NDalicPINVOKE.Scrollable_SetOvershootEnabled(swigCPtr, enable);
412 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
415 public void SetOvershootEffectColor(Vector4 color)
417 NDalicPINVOKE.Scrollable_SetOvershootEffectColor(swigCPtr, Vector4.getCPtr(color));
418 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
421 public Vector4 GetOvershootEffectColor()
423 Vector4 ret = new Vector4(NDalicPINVOKE.Scrollable_GetOvershootEffectColor(swigCPtr), true);
424 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
428 public void SetOvershootAnimationSpeed(float pixelsPerSecond)
430 NDalicPINVOKE.Scrollable_SetOvershootAnimationSpeed(swigCPtr, pixelsPerSecond);
431 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
434 public float GetOvershootAnimationSpeed()
436 float ret = NDalicPINVOKE.Scrollable_GetOvershootAnimationSpeed(swigCPtr);
437 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
441 internal ScrollableSignal ScrollStartedSignal()
443 ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollStartedSignal(swigCPtr), false);
444 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
448 internal ScrollableSignal ScrollUpdatedSignal()
450 ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollUpdatedSignal(swigCPtr), false);
451 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
455 internal ScrollableSignal ScrollCompletedSignal()
457 ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollCompletedSignal(swigCPtr), false);
458 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
462 public enum PropertyRange
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
470 public Vector4 OvershootEffectColor
474 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
475 GetProperty(Scrollable.Property.OVERSHOOT_EFFECT_COLOR).Get(temp);
480 SetProperty(Scrollable.Property.OVERSHOOT_EFFECT_COLOR, new Tizen.NUI.PropertyValue(value));
483 public float OvershootAnimationSpeed
488 GetProperty(Scrollable.Property.OVERSHOOT_ANIMATION_SPEED).Get(ref temp);
493 SetProperty(Scrollable.Property.OVERSHOOT_ANIMATION_SPEED, new Tizen.NUI.PropertyValue(value));
496 public bool OvershootEnabled
501 GetProperty(Scrollable.Property.OVERSHOOT_ENABLED).Get(ref temp);
506 SetProperty(Scrollable.Property.OVERSHOOT_ENABLED, new Tizen.NUI.PropertyValue(value));
509 public Vector2 OvershootSize
513 Vector2 temp = new Vector2(0.0f, 0.0f);
514 GetProperty(Scrollable.Property.OVERSHOOT_SIZE).Get(temp);
519 SetProperty(Scrollable.Property.OVERSHOOT_SIZE, new Tizen.NUI.PropertyValue(value));
522 public int ScrollToAlphaFunction
527 GetProperty(Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION).Get(ref temp);
532 SetProperty(Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION, new Tizen.NUI.PropertyValue(value));
535 public Vector2 ScrollRelativePosition
539 Vector2 temp = new Vector2(0.0f, 0.0f);
540 GetProperty(Scrollable.Property.SCROLL_RELATIVE_POSITION).Get(temp);
545 SetProperty(Scrollable.Property.SCROLL_RELATIVE_POSITION, new Tizen.NUI.PropertyValue(value));
548 public Vector2 ScrollPositionMin
552 Vector2 temp = new Vector2(0.0f, 0.0f);
553 GetProperty(Scrollable.Property.SCROLL_POSITION_MIN).Get(temp);
558 SetProperty(Scrollable.Property.SCROLL_POSITION_MIN, new Tizen.NUI.PropertyValue(value));
561 public Vector2 ScrollPositionMax
565 Vector2 temp = new Vector2(0.0f, 0.0f);
566 GetProperty(Scrollable.Property.SCROLL_POSITION_MAX).Get(temp);
571 SetProperty(Scrollable.Property.SCROLL_POSITION_MAX, new Tizen.NUI.PropertyValue(value));
574 public bool CanScrollVertical
579 GetProperty(Scrollable.Property.CAN_SCROLL_VERTICAL).Get(ref temp);
584 SetProperty(Scrollable.Property.CAN_SCROLL_VERTICAL, new Tizen.NUI.PropertyValue(value));
587 public bool CanScrollHorizontal
592 GetProperty(Scrollable.Property.CAN_SCROLL_HORIZONTAL).Get(ref temp);
597 SetProperty(Scrollable.Property.CAN_SCROLL_HORIZONTAL, new Tizen.NUI.PropertyValue(value));