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 if (swigCPtr.Handle != global::System.IntPtr.Zero)
58 NDalicPINVOKE.delete_Scrollable(swigCPtr);
60 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
66 public class StartedEventArgs : EventArgs
68 private Vector2 _vector2;
70 public Vector2 Vector2
83 public class UpdatedEventArgs : EventArgs
85 private Vector2 _vector2;
87 public Vector2 Vector2
100 public class CompletedEventArgs : EventArgs
102 private Vector2 _vector2;
104 public Vector2 Vector2
117 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
118 private delegate void StartedCallbackDelegate(IntPtr vector2);
119 private DaliEventHandler<object, StartedEventArgs> _scrollableStartedEventHandler;
120 private StartedCallbackDelegate _scrollableStartedCallbackDelegate;
122 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
123 private delegate void UpdatedCallbackDelegate(IntPtr vector2);
124 private DaliEventHandler<object, UpdatedEventArgs> _scrollableUpdatedEventHandler;
125 private UpdatedCallbackDelegate _scrollableUpdatedCallbackDelegate;
127 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
128 private delegate void CompletedCallbackDelegate(IntPtr vector2);
129 private DaliEventHandler<object, CompletedEventArgs> _scrollableCompletedEventHandler;
130 private CompletedCallbackDelegate _scrollableCompletedCallbackDelegate;
132 public event DaliEventHandler<object, StartedEventArgs> ScrollStarted
138 // Restricted to only one listener
139 if (_scrollableStartedEventHandler == null)
141 _scrollableStartedEventHandler += value;
143 _scrollableStartedCallbackDelegate = new StartedCallbackDelegate(OnStarted);
144 this.ScrollStartedSignal().Connect(_scrollableStartedCallbackDelegate);
153 if (_scrollableStartedEventHandler != null)
155 this.ScrollStartedSignal().Disconnect(_scrollableStartedCallbackDelegate);
158 _scrollableStartedEventHandler -= value;
163 private void OnStarted(IntPtr vector2)
165 StartedEventArgs e = new StartedEventArgs();
167 // Populate all members of "e" (StartedEventArgs) with real data
168 e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2);
170 if (_scrollableStartedEventHandler != null)
172 //here we send all data to user event handlers
173 _scrollableStartedEventHandler(this, e);
178 public event DaliEventHandler<object, UpdatedEventArgs> ScrollUpdated
184 // Restricted to only one listener
185 if (_scrollableUpdatedEventHandler == null)
187 _scrollableUpdatedEventHandler += value;
189 _scrollableUpdatedCallbackDelegate = new UpdatedCallbackDelegate(OnUpdated);
190 this.ScrollUpdatedSignal().Connect(_scrollableUpdatedCallbackDelegate);
199 if (_scrollableUpdatedEventHandler != null)
201 this.ScrollUpdatedSignal().Disconnect(_scrollableUpdatedCallbackDelegate);
204 _scrollableUpdatedEventHandler -= value;
209 private void OnUpdated(IntPtr vector2)
211 UpdatedEventArgs e = new UpdatedEventArgs();
213 // Populate all members of "e" (UpdatedEventArgs) with real data
214 e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2);
216 if (_scrollableUpdatedEventHandler != null)
218 //here we send all data to user event handlers
219 _scrollableUpdatedEventHandler(this, e);
224 public event DaliEventHandler<object, CompletedEventArgs> ScrollCompleted
230 // Restricted to only one listener
231 if (_scrollableCompletedEventHandler == null)
233 _scrollableCompletedEventHandler += value;
235 _scrollableCompletedCallbackDelegate = new CompletedCallbackDelegate(OnCompleted);
236 this.ScrollCompletedSignal().Connect(_scrollableCompletedCallbackDelegate);
245 if (_scrollableCompletedEventHandler != null)
247 this.ScrollCompletedSignal().Disconnect(_scrollableCompletedCallbackDelegate);
250 _scrollableCompletedEventHandler -= value;
255 private void OnCompleted(IntPtr vector2)
257 CompletedEventArgs e = new CompletedEventArgs();
259 // Populate all members of "e" (CompletedEventArgs) with real data
260 e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2);
262 if (_scrollableCompletedEventHandler != null)
264 //here we send all data to user event handlers
265 _scrollableCompletedEventHandler(this, e);
271 public class Property
273 public static readonly int OVERSHOOT_EFFECT_COLOR = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_EFFECT_COLOR_get();
274 public static readonly int OVERSHOOT_ANIMATION_SPEED = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_ANIMATION_SPEED_get();
275 public static readonly int OVERSHOOT_ENABLED = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_ENABLED_get();
276 public static readonly int OVERSHOOT_SIZE = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_SIZE_get();
277 public static readonly int SCROLL_TO_ALPHA_FUNCTION = NDalicPINVOKE.Scrollable_Property_SCROLL_TO_ALPHA_FUNCTION_get();
278 public static readonly int SCROLL_RELATIVE_POSITION = NDalicPINVOKE.Scrollable_Property_SCROLL_RELATIVE_POSITION_get();
279 public static readonly int SCROLL_POSITION_MIN = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_get();
280 public static readonly int SCROLL_POSITION_MIN_X = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_X_get();
281 public static readonly int SCROLL_POSITION_MIN_Y = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_Y_get();
282 public static readonly int SCROLL_POSITION_MAX = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_get();
283 public static readonly int SCROLL_POSITION_MAX_X = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_X_get();
284 public static readonly int SCROLL_POSITION_MAX_Y = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_Y_get();
285 public static readonly int CAN_SCROLL_VERTICAL = NDalicPINVOKE.Scrollable_Property_CAN_SCROLL_VERTICAL_get();
286 public static readonly int CAN_SCROLL_HORIZONTAL = NDalicPINVOKE.Scrollable_Property_CAN_SCROLL_HORIZONTAL_get();
290 public Scrollable() : this(NDalicPINVOKE.new_Scrollable__SWIG_0(), true)
292 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
295 private bool IsOvershootEnabled()
297 bool ret = NDalicPINVOKE.Scrollable_IsOvershootEnabled(swigCPtr);
298 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
302 private void SetOvershootEnabled(bool enable)
304 NDalicPINVOKE.Scrollable_SetOvershootEnabled(swigCPtr, enable);
305 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
308 private void SetOvershootEffectColor(Vector4 color)
310 NDalicPINVOKE.Scrollable_SetOvershootEffectColor(swigCPtr, Vector4.getCPtr(color));
311 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
314 private Vector4 GetOvershootEffectColor()
316 Vector4 ret = new Vector4(NDalicPINVOKE.Scrollable_GetOvershootEffectColor(swigCPtr), true);
317 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
321 private void SetOvershootAnimationSpeed(float pixelsPerSecond)
323 NDalicPINVOKE.Scrollable_SetOvershootAnimationSpeed(swigCPtr, pixelsPerSecond);
324 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
327 private float GetOvershootAnimationSpeed()
329 float ret = NDalicPINVOKE.Scrollable_GetOvershootAnimationSpeed(swigCPtr);
330 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
334 internal ScrollableSignal ScrollStartedSignal()
336 ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollStartedSignal(swigCPtr), false);
337 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
341 internal ScrollableSignal ScrollUpdatedSignal()
343 ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollUpdatedSignal(swigCPtr), false);
344 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
348 internal ScrollableSignal ScrollCompletedSignal()
350 ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollCompletedSignal(swigCPtr), false);
351 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
355 public Vector4 OvershootEffectColor
359 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
360 GetProperty(Scrollable.Property.OVERSHOOT_EFFECT_COLOR).Get(temp);
365 SetProperty(Scrollable.Property.OVERSHOOT_EFFECT_COLOR, new Tizen.NUI.PropertyValue(value));
368 public float OvershootAnimationSpeed
373 GetProperty(Scrollable.Property.OVERSHOOT_ANIMATION_SPEED).Get(out temp);
378 SetProperty(Scrollable.Property.OVERSHOOT_ANIMATION_SPEED, new Tizen.NUI.PropertyValue(value));
381 public bool OvershootEnabled
386 GetProperty(Scrollable.Property.OVERSHOOT_ENABLED).Get(out temp);
391 SetProperty(Scrollable.Property.OVERSHOOT_ENABLED, new Tizen.NUI.PropertyValue(value));
394 public Vector2 OvershootSize
398 Vector2 temp = new Vector2(0.0f, 0.0f);
399 GetProperty(Scrollable.Property.OVERSHOOT_SIZE).Get(temp);
404 SetProperty(Scrollable.Property.OVERSHOOT_SIZE, new Tizen.NUI.PropertyValue(value));
407 public int ScrollToAlphaFunction
412 GetProperty(Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION).Get(out temp);
417 SetProperty(Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION, new Tizen.NUI.PropertyValue(value));
420 public Vector2 ScrollRelativePosition
424 Vector2 temp = new Vector2(0.0f, 0.0f);
425 GetProperty(Scrollable.Property.SCROLL_RELATIVE_POSITION).Get(temp);
430 SetProperty(Scrollable.Property.SCROLL_RELATIVE_POSITION, new Tizen.NUI.PropertyValue(value));
433 public Vector2 ScrollPositionMin
437 Vector2 temp = new Vector2(0.0f, 0.0f);
438 GetProperty(Scrollable.Property.SCROLL_POSITION_MIN).Get(temp);
443 SetProperty(Scrollable.Property.SCROLL_POSITION_MIN, new Tizen.NUI.PropertyValue(value));
446 public Vector2 ScrollPositionMax
450 Vector2 temp = new Vector2(0.0f, 0.0f);
451 GetProperty(Scrollable.Property.SCROLL_POSITION_MAX).Get(temp);
456 SetProperty(Scrollable.Property.SCROLL_POSITION_MAX, new Tizen.NUI.PropertyValue(value));
459 public bool CanScrollVertical
464 GetProperty(Scrollable.Property.CAN_SCROLL_VERTICAL).Get(out temp);
469 SetProperty(Scrollable.Property.CAN_SCROLL_VERTICAL, new Tizen.NUI.PropertyValue(value));
472 public bool CanScrollHorizontal
477 GetProperty(Scrollable.Property.CAN_SCROLL_HORIZONTAL).Get(out temp);
482 SetProperty(Scrollable.Property.CAN_SCROLL_HORIZONTAL, new Tizen.NUI.PropertyValue(value));