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 //------------------------------------------------------------------------------
11 namespace Tizen.NUI.BaseComponents
15 using System.Runtime.InteropServices;
17 public class Scrollable : View
19 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
21 internal Scrollable(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Scrollable_SWIGUpcast(cPtr), cMemoryOwn)
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;
28 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Scrollable obj)
30 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
33 protected override void Dispose(DisposeTypes type)
40 if (type == DisposeTypes.Explicit)
43 //Release your own managed resources here.
44 //You should release all of your own disposable objects here.
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.
52 //Unreference this from if a static instance refer to this.
53 ViewRegistry.UnregisterView(this);
55 if (swigCPtr.Handle != global::System.IntPtr.Zero)
60 NDalicPINVOKE.delete_Scrollable(swigCPtr);
62 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
68 public class StartedEventArgs : EventArgs
70 private Vector2 _vector2;
72 public Vector2 Vector2
85 public class UpdatedEventArgs : EventArgs
87 private Vector2 _vector2;
89 public Vector2 Vector2
102 public class CompletedEventArgs : EventArgs
104 private Vector2 _vector2;
106 public Vector2 Vector2
119 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
120 private delegate void StartedCallbackDelegate(IntPtr vector2);
121 private DaliEventHandler<object, StartedEventArgs> _scrollableStartedEventHandler;
122 private StartedCallbackDelegate _scrollableStartedCallbackDelegate;
124 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
125 private delegate void UpdatedCallbackDelegate(IntPtr vector2);
126 private DaliEventHandler<object, UpdatedEventArgs> _scrollableUpdatedEventHandler;
127 private UpdatedCallbackDelegate _scrollableUpdatedCallbackDelegate;
129 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
130 private delegate void CompletedCallbackDelegate(IntPtr vector2);
131 private DaliEventHandler<object, CompletedEventArgs> _scrollableCompletedEventHandler;
132 private CompletedCallbackDelegate _scrollableCompletedCallbackDelegate;
134 public event DaliEventHandler<object, StartedEventArgs> ScrollStarted
140 // Restricted to only one listener
141 if (_scrollableStartedEventHandler == null)
143 _scrollableStartedEventHandler += value;
145 _scrollableStartedCallbackDelegate = new StartedCallbackDelegate(OnStarted);
146 this.ScrollStartedSignal().Connect(_scrollableStartedCallbackDelegate);
155 if (_scrollableStartedEventHandler != null)
157 this.ScrollStartedSignal().Disconnect(_scrollableStartedCallbackDelegate);
160 _scrollableStartedEventHandler -= value;
165 private void OnStarted(IntPtr vector2)
167 StartedEventArgs e = new StartedEventArgs();
169 // Populate all members of "e" (StartedEventArgs) with real data
170 e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2);
172 if (_scrollableStartedEventHandler != null)
174 //here we send all data to user event handlers
175 _scrollableStartedEventHandler(this, e);
180 public event DaliEventHandler<object, UpdatedEventArgs> ScrollUpdated
186 // Restricted to only one listener
187 if (_scrollableUpdatedEventHandler == null)
189 _scrollableUpdatedEventHandler += value;
191 _scrollableUpdatedCallbackDelegate = new UpdatedCallbackDelegate(OnUpdated);
192 this.ScrollUpdatedSignal().Connect(_scrollableUpdatedCallbackDelegate);
201 if (_scrollableUpdatedEventHandler != null)
203 this.ScrollUpdatedSignal().Disconnect(_scrollableUpdatedCallbackDelegate);
206 _scrollableUpdatedEventHandler -= value;
211 private void OnUpdated(IntPtr vector2)
213 UpdatedEventArgs e = new UpdatedEventArgs();
215 // Populate all members of "e" (UpdatedEventArgs) with real data
216 e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2);
218 if (_scrollableUpdatedEventHandler != null)
220 //here we send all data to user event handlers
221 _scrollableUpdatedEventHandler(this, e);
226 public event DaliEventHandler<object, CompletedEventArgs> ScrollCompleted
232 // Restricted to only one listener
233 if (_scrollableCompletedEventHandler == null)
235 _scrollableCompletedEventHandler += value;
237 _scrollableCompletedCallbackDelegate = new CompletedCallbackDelegate(OnCompleted);
238 this.ScrollCompletedSignal().Connect(_scrollableCompletedCallbackDelegate);
247 if (_scrollableCompletedEventHandler != null)
249 this.ScrollCompletedSignal().Disconnect(_scrollableCompletedCallbackDelegate);
252 _scrollableCompletedEventHandler -= value;
257 private void OnCompleted(IntPtr vector2)
259 CompletedEventArgs e = new CompletedEventArgs();
261 // Populate all members of "e" (CompletedEventArgs) with real data
262 e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2);
264 if (_scrollableCompletedEventHandler != null)
266 //here we send all data to user event handlers
267 _scrollableCompletedEventHandler(this, e);
273 public class Property
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();
292 public Scrollable() : this(NDalicPINVOKE.new_Scrollable__SWIG_0(), true)
294 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
297 internal new static Scrollable DownCast(BaseHandle handle)
299 Scrollable ret = new Scrollable(NDalicPINVOKE.Scrollable_DownCast(BaseHandle.getCPtr(handle)), true);
300 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
304 private bool IsOvershootEnabled()
306 bool ret = NDalicPINVOKE.Scrollable_IsOvershootEnabled(swigCPtr);
307 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
311 private void SetOvershootEnabled(bool enable)
313 NDalicPINVOKE.Scrollable_SetOvershootEnabled(swigCPtr, enable);
314 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
317 private void SetOvershootEffectColor(Vector4 color)
319 NDalicPINVOKE.Scrollable_SetOvershootEffectColor(swigCPtr, Vector4.getCPtr(color));
320 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
323 private Vector4 GetOvershootEffectColor()
325 Vector4 ret = new Vector4(NDalicPINVOKE.Scrollable_GetOvershootEffectColor(swigCPtr), true);
326 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
330 private void SetOvershootAnimationSpeed(float pixelsPerSecond)
332 NDalicPINVOKE.Scrollable_SetOvershootAnimationSpeed(swigCPtr, pixelsPerSecond);
333 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
336 private float GetOvershootAnimationSpeed()
338 float ret = NDalicPINVOKE.Scrollable_GetOvershootAnimationSpeed(swigCPtr);
339 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
343 internal ScrollableSignal ScrollStartedSignal()
345 ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollStartedSignal(swigCPtr), false);
346 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
350 internal ScrollableSignal ScrollUpdatedSignal()
352 ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollUpdatedSignal(swigCPtr), false);
353 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
357 internal ScrollableSignal ScrollCompletedSignal()
359 ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollCompletedSignal(swigCPtr), false);
360 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
364 public Vector4 OvershootEffectColor
368 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
369 GetProperty(Scrollable.Property.OVERSHOOT_EFFECT_COLOR).Get(temp);
374 SetProperty(Scrollable.Property.OVERSHOOT_EFFECT_COLOR, new Tizen.NUI.PropertyValue(value));
377 public float OvershootAnimationSpeed
382 GetProperty(Scrollable.Property.OVERSHOOT_ANIMATION_SPEED).Get(out temp);
387 SetProperty(Scrollable.Property.OVERSHOOT_ANIMATION_SPEED, new Tizen.NUI.PropertyValue(value));
390 public bool OvershootEnabled
395 GetProperty(Scrollable.Property.OVERSHOOT_ENABLED).Get(out temp);
400 SetProperty(Scrollable.Property.OVERSHOOT_ENABLED, new Tizen.NUI.PropertyValue(value));
403 public Vector2 OvershootSize
407 Vector2 temp = new Vector2(0.0f, 0.0f);
408 GetProperty(Scrollable.Property.OVERSHOOT_SIZE).Get(temp);
413 SetProperty(Scrollable.Property.OVERSHOOT_SIZE, new Tizen.NUI.PropertyValue(value));
416 public int ScrollToAlphaFunction
421 GetProperty(Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION).Get(out temp);
426 SetProperty(Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION, new Tizen.NUI.PropertyValue(value));
429 public Vector2 ScrollRelativePosition
433 Vector2 temp = new Vector2(0.0f, 0.0f);
434 GetProperty(Scrollable.Property.SCROLL_RELATIVE_POSITION).Get(temp);
439 SetProperty(Scrollable.Property.SCROLL_RELATIVE_POSITION, new Tizen.NUI.PropertyValue(value));
442 public Vector2 ScrollPositionMin
446 Vector2 temp = new Vector2(0.0f, 0.0f);
447 GetProperty(Scrollable.Property.SCROLL_POSITION_MIN).Get(temp);
452 SetProperty(Scrollable.Property.SCROLL_POSITION_MIN, new Tizen.NUI.PropertyValue(value));
455 public Vector2 ScrollPositionMax
459 Vector2 temp = new Vector2(0.0f, 0.0f);
460 GetProperty(Scrollable.Property.SCROLL_POSITION_MAX).Get(temp);
465 SetProperty(Scrollable.Property.SCROLL_POSITION_MAX, new Tizen.NUI.PropertyValue(value));
468 public bool CanScrollVertical
473 GetProperty(Scrollable.Property.CAN_SCROLL_VERTICAL).Get(out temp);
478 SetProperty(Scrollable.Property.CAN_SCROLL_VERTICAL, new Tizen.NUI.PropertyValue(value));
481 public bool CanScrollHorizontal
486 GetProperty(Scrollable.Property.CAN_SCROLL_HORIZONTAL).Get(out temp);
491 SetProperty(Scrollable.Property.CAN_SCROLL_HORIZONTAL, new Tizen.NUI.PropertyValue(value));