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);
27 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Scrollable obj)
29 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
32 protected override void Dispose(DisposeTypes type)
39 if (type == DisposeTypes.Explicit)
42 //Release your own managed resources here.
43 //You should release all of your own disposable objects here.
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.
51 if (swigCPtr.Handle != global::System.IntPtr.Zero)
56 NDalicPINVOKE.delete_Scrollable(swigCPtr);
58 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
64 public class StartedEventArgs : EventArgs
66 private Vector2 _vector2;
68 public Vector2 Vector2
81 public class UpdatedEventArgs : EventArgs
83 private Vector2 _vector2;
85 public Vector2 Vector2
98 public class CompletedEventArgs : EventArgs
100 private Vector2 _vector2;
102 public Vector2 Vector2
115 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
116 private delegate void StartedCallbackDelegate(IntPtr vector2);
117 private DaliEventHandler<object, StartedEventArgs> _scrollableStartedEventHandler;
118 private StartedCallbackDelegate _scrollableStartedCallbackDelegate;
120 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
121 private delegate void UpdatedCallbackDelegate(IntPtr vector2);
122 private DaliEventHandler<object, UpdatedEventArgs> _scrollableUpdatedEventHandler;
123 private UpdatedCallbackDelegate _scrollableUpdatedCallbackDelegate;
125 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
126 private delegate void CompletedCallbackDelegate(IntPtr vector2);
127 private DaliEventHandler<object, CompletedEventArgs> _scrollableCompletedEventHandler;
128 private CompletedCallbackDelegate _scrollableCompletedCallbackDelegate;
130 public event DaliEventHandler<object, StartedEventArgs> ScrollStarted
136 // Restricted to only one listener
137 if (_scrollableStartedEventHandler == null)
139 _scrollableStartedEventHandler += value;
141 _scrollableStartedCallbackDelegate = new StartedCallbackDelegate(OnStarted);
142 this.ScrollStartedSignal().Connect(_scrollableStartedCallbackDelegate);
151 if (_scrollableStartedEventHandler != null)
153 this.ScrollStartedSignal().Disconnect(_scrollableStartedCallbackDelegate);
156 _scrollableStartedEventHandler -= value;
161 private void OnStarted(IntPtr vector2)
163 StartedEventArgs e = new StartedEventArgs();
165 // Populate all members of "e" (StartedEventArgs) with real data
166 e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2);
168 if (_scrollableStartedEventHandler != null)
170 //here we send all data to user event handlers
171 _scrollableStartedEventHandler(this, e);
176 public event DaliEventHandler<object, UpdatedEventArgs> ScrollUpdated
182 // Restricted to only one listener
183 if (_scrollableUpdatedEventHandler == null)
185 _scrollableUpdatedEventHandler += value;
187 _scrollableUpdatedCallbackDelegate = new UpdatedCallbackDelegate(OnUpdated);
188 this.ScrollUpdatedSignal().Connect(_scrollableUpdatedCallbackDelegate);
197 if (_scrollableUpdatedEventHandler != null)
199 this.ScrollUpdatedSignal().Disconnect(_scrollableUpdatedCallbackDelegate);
202 _scrollableUpdatedEventHandler -= value;
207 private void OnUpdated(IntPtr vector2)
209 UpdatedEventArgs e = new UpdatedEventArgs();
211 // Populate all members of "e" (UpdatedEventArgs) with real data
212 e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2);
214 if (_scrollableUpdatedEventHandler != null)
216 //here we send all data to user event handlers
217 _scrollableUpdatedEventHandler(this, e);
222 public event DaliEventHandler<object, CompletedEventArgs> ScrollCompleted
228 // Restricted to only one listener
229 if (_scrollableCompletedEventHandler == null)
231 _scrollableCompletedEventHandler += value;
233 _scrollableCompletedCallbackDelegate = new CompletedCallbackDelegate(OnCompleted);
234 this.ScrollCompletedSignal().Connect(_scrollableCompletedCallbackDelegate);
243 if (_scrollableCompletedEventHandler != null)
245 this.ScrollCompletedSignal().Disconnect(_scrollableCompletedCallbackDelegate);
248 _scrollableCompletedEventHandler -= value;
253 private void OnCompleted(IntPtr vector2)
255 CompletedEventArgs e = new CompletedEventArgs();
257 // Populate all members of "e" (CompletedEventArgs) with real data
258 e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2);
260 if (_scrollableCompletedEventHandler != null)
262 //here we send all data to user event handlers
263 _scrollableCompletedEventHandler(this, e);
269 public class Property
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();
288 public Scrollable() : this(NDalicPINVOKE.new_Scrollable__SWIG_0(), true)
290 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
293 private bool IsOvershootEnabled()
295 bool ret = NDalicPINVOKE.Scrollable_IsOvershootEnabled(swigCPtr);
296 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
300 private void SetOvershootEnabled(bool enable)
302 NDalicPINVOKE.Scrollable_SetOvershootEnabled(swigCPtr, enable);
303 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
306 private void SetOvershootEffectColor(Vector4 color)
308 NDalicPINVOKE.Scrollable_SetOvershootEffectColor(swigCPtr, Vector4.getCPtr(color));
309 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
312 private Vector4 GetOvershootEffectColor()
314 Vector4 ret = new Vector4(NDalicPINVOKE.Scrollable_GetOvershootEffectColor(swigCPtr), true);
315 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
319 private void SetOvershootAnimationSpeed(float pixelsPerSecond)
321 NDalicPINVOKE.Scrollable_SetOvershootAnimationSpeed(swigCPtr, pixelsPerSecond);
322 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
325 private float GetOvershootAnimationSpeed()
327 float ret = NDalicPINVOKE.Scrollable_GetOvershootAnimationSpeed(swigCPtr);
328 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
332 internal ScrollableSignal ScrollStartedSignal()
334 ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollStartedSignal(swigCPtr), false);
335 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
339 internal ScrollableSignal ScrollUpdatedSignal()
341 ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollUpdatedSignal(swigCPtr), false);
342 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
346 internal ScrollableSignal ScrollCompletedSignal()
348 ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollCompletedSignal(swigCPtr), false);
349 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
353 public Vector4 OvershootEffectColor
357 Vector4 temp = new Vector4(0.0f, 0.0f, 0.0f, 0.0f);
358 GetProperty(Scrollable.Property.OVERSHOOT_EFFECT_COLOR).Get(temp);
363 SetProperty(Scrollable.Property.OVERSHOOT_EFFECT_COLOR, new Tizen.NUI.PropertyValue(value));
366 public float OvershootAnimationSpeed
371 GetProperty(Scrollable.Property.OVERSHOOT_ANIMATION_SPEED).Get(out temp);
376 SetProperty(Scrollable.Property.OVERSHOOT_ANIMATION_SPEED, new Tizen.NUI.PropertyValue(value));
379 public bool OvershootEnabled
384 GetProperty(Scrollable.Property.OVERSHOOT_ENABLED).Get(out temp);
389 SetProperty(Scrollable.Property.OVERSHOOT_ENABLED, new Tizen.NUI.PropertyValue(value));
392 public Vector2 OvershootSize
396 Vector2 temp = new Vector2(0.0f, 0.0f);
397 GetProperty(Scrollable.Property.OVERSHOOT_SIZE).Get(temp);
402 SetProperty(Scrollable.Property.OVERSHOOT_SIZE, new Tizen.NUI.PropertyValue(value));
405 public int ScrollToAlphaFunction
410 GetProperty(Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION).Get(out temp);
415 SetProperty(Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION, new Tizen.NUI.PropertyValue(value));
418 public Vector2 ScrollRelativePosition
422 Vector2 temp = new Vector2(0.0f, 0.0f);
423 GetProperty(Scrollable.Property.SCROLL_RELATIVE_POSITION).Get(temp);
428 SetProperty(Scrollable.Property.SCROLL_RELATIVE_POSITION, new Tizen.NUI.PropertyValue(value));
431 public Vector2 ScrollPositionMin
435 Vector2 temp = new Vector2(0.0f, 0.0f);
436 GetProperty(Scrollable.Property.SCROLL_POSITION_MIN).Get(temp);
441 SetProperty(Scrollable.Property.SCROLL_POSITION_MIN, new Tizen.NUI.PropertyValue(value));
444 public Vector2 ScrollPositionMax
448 Vector2 temp = new Vector2(0.0f, 0.0f);
449 GetProperty(Scrollable.Property.SCROLL_POSITION_MAX).Get(temp);
454 SetProperty(Scrollable.Property.SCROLL_POSITION_MAX, new Tizen.NUI.PropertyValue(value));
457 public bool CanScrollVertical
462 GetProperty(Scrollable.Property.CAN_SCROLL_VERTICAL).Get(out temp);
467 SetProperty(Scrollable.Property.CAN_SCROLL_VERTICAL, new Tizen.NUI.PropertyValue(value));
470 public bool CanScrollHorizontal
475 GetProperty(Scrollable.Property.CAN_SCROLL_HORIZONTAL).Get(out temp);
480 SetProperty(Scrollable.Property.CAN_SCROLL_HORIZONTAL, new Tizen.NUI.PropertyValue(value));