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 //------------------------------------------------------------------------------
14 using System.Runtime.InteropServices;
17 public class Scrollable : View {
18 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
20 internal Scrollable(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NDalicPINVOKE.Scrollable_SWIGUpcast(cPtr), cMemoryOwn) {
21 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
24 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Scrollable obj) {
25 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
29 DisposeQueue.Instance.Add(this);
32 public override void Dispose() {
33 if (!Stage.IsInstalled()) {
34 DisposeQueue.Instance.Add(this);
39 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
42 NDalicPINVOKE.delete_Scrollable(swigCPtr);
44 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
46 global::System.GC.SuppressFinalize(this);
53 public class StartedEventArgs : EventArgs
55 private Vector2 _vector2;
57 public Vector2 Vector2
70 public class UpdatedEventArgs : EventArgs
72 private Vector2 _vector2;
74 public Vector2 Vector2
87 public class CompletedEventArgs : EventArgs
89 private Vector2 _vector2;
91 public Vector2 Vector2
104 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
105 private delegate void StartedCallbackDelegate(IntPtr vector2);
106 private DaliEventHandler<object,StartedEventArgs> _scrollableStartedEventHandler;
107 private StartedCallbackDelegate _scrollableStartedCallbackDelegate;
109 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
110 private delegate void UpdatedCallbackDelegate(IntPtr vector2);
111 private DaliEventHandler<object,UpdatedEventArgs> _scrollableUpdatedEventHandler;
112 private UpdatedCallbackDelegate _scrollableUpdatedCallbackDelegate;
114 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
115 private delegate void CompletedCallbackDelegate(IntPtr vector2);
116 private DaliEventHandler<object,CompletedEventArgs> _scrollableCompletedEventHandler;
117 private CompletedCallbackDelegate _scrollableCompletedCallbackDelegate;
119 public event DaliEventHandler<object,StartedEventArgs> ScrollStarted
125 // Restricted to only one listener
126 if (_scrollableStartedEventHandler == null)
128 _scrollableStartedEventHandler += value;
130 _scrollableStartedCallbackDelegate = new StartedCallbackDelegate(OnStarted);
131 this.ScrollStartedSignal().Connect(_scrollableStartedCallbackDelegate);
140 if (_scrollableStartedEventHandler != null)
142 this.ScrollStartedSignal().Disconnect(_scrollableStartedCallbackDelegate);
145 _scrollableStartedEventHandler -= value;
150 private void OnStarted(IntPtr vector2)
152 StartedEventArgs e = new StartedEventArgs();
154 // Populate all members of "e" (StartedEventArgs) with real data
155 e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2);
157 if (_scrollableStartedEventHandler != null)
159 //here we send all data to user event handlers
160 _scrollableStartedEventHandler(this, e);
165 public event DaliEventHandler<object,UpdatedEventArgs> ScrollUpdated
171 // Restricted to only one listener
172 if (_scrollableUpdatedEventHandler == null)
174 _scrollableUpdatedEventHandler += value;
176 _scrollableUpdatedCallbackDelegate = new UpdatedCallbackDelegate(OnUpdated);
177 this.ScrollUpdatedSignal().Connect(_scrollableUpdatedCallbackDelegate);
186 if (_scrollableUpdatedEventHandler != null)
188 this.ScrollUpdatedSignal().Disconnect(_scrollableUpdatedCallbackDelegate);
191 _scrollableUpdatedEventHandler -= value;
196 private void OnUpdated(IntPtr vector2)
198 UpdatedEventArgs e = new UpdatedEventArgs();
200 // Populate all members of "e" (UpdatedEventArgs) with real data
201 e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2);
203 if (_scrollableUpdatedEventHandler != null)
205 //here we send all data to user event handlers
206 _scrollableUpdatedEventHandler(this, e);
211 public event DaliEventHandler<object,CompletedEventArgs> ScrollCompleted
217 // Restricted to only one listener
218 if (_scrollableCompletedEventHandler == null)
220 _scrollableCompletedEventHandler += value;
222 _scrollableCompletedCallbackDelegate = new CompletedCallbackDelegate(OnCompleted);
223 this.ScrollCompletedSignal().Connect(_scrollableCompletedCallbackDelegate);
232 if (_scrollableCompletedEventHandler != null)
234 this.ScrollCompletedSignal().Disconnect(_scrollableCompletedCallbackDelegate);
237 _scrollableCompletedEventHandler -= value;
242 private void OnCompleted(IntPtr vector2)
244 CompletedEventArgs e = new CompletedEventArgs();
246 // Populate all members of "e" (CompletedEventArgs) with real data
247 e.Vector2 = Tizen.NUI.Vector2.GetVector2FromPtr(vector2);
249 if (_scrollableCompletedEventHandler != null)
251 //here we send all data to user event handlers
252 _scrollableCompletedEventHandler(this, e);
258 public class Property : global::System.IDisposable {
259 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
260 protected bool swigCMemOwn;
262 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) {
263 swigCMemOwn = cMemoryOwn;
264 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
267 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) {
268 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
275 public virtual void Dispose() {
277 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
280 NDalicPINVOKE.delete_Scrollable_Property(swigCPtr);
282 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
284 global::System.GC.SuppressFinalize(this);
288 public Property() : this(NDalicPINVOKE.new_Scrollable_Property(), true) {
289 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
292 public static readonly int OVERSHOOT_EFFECT_COLOR = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_EFFECT_COLOR_get();
293 public static readonly int OVERSHOOT_ANIMATION_SPEED = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_ANIMATION_SPEED_get();
294 public static readonly int OVERSHOOT_ENABLED = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_ENABLED_get();
295 public static readonly int OVERSHOOT_SIZE = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_SIZE_get();
296 public static readonly int SCROLL_TO_ALPHA_FUNCTION = NDalicPINVOKE.Scrollable_Property_SCROLL_TO_ALPHA_FUNCTION_get();
297 public static readonly int SCROLL_RELATIVE_POSITION = NDalicPINVOKE.Scrollable_Property_SCROLL_RELATIVE_POSITION_get();
298 public static readonly int SCROLL_POSITION_MIN = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_get();
299 public static readonly int SCROLL_POSITION_MIN_X = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_X_get();
300 public static readonly int SCROLL_POSITION_MIN_Y = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_Y_get();
301 public static readonly int SCROLL_POSITION_MAX = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_get();
302 public static readonly int SCROLL_POSITION_MAX_X = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_X_get();
303 public static readonly int SCROLL_POSITION_MAX_Y = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_Y_get();
304 public static readonly int CAN_SCROLL_VERTICAL = NDalicPINVOKE.Scrollable_Property_CAN_SCROLL_VERTICAL_get();
305 public static readonly int CAN_SCROLL_HORIZONTAL = NDalicPINVOKE.Scrollable_Property_CAN_SCROLL_HORIZONTAL_get();
309 public Scrollable() : this(NDalicPINVOKE.new_Scrollable__SWIG_0(), true) {
310 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
313 public Scrollable(Scrollable handle) : this(NDalicPINVOKE.new_Scrollable__SWIG_1(Scrollable.getCPtr(handle)), true) {
314 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
317 public Scrollable Assign(Scrollable handle) {
318 Scrollable ret = new Scrollable(NDalicPINVOKE.Scrollable_Assign(swigCPtr, Scrollable.getCPtr(handle)), false);
319 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
323 public new static Scrollable DownCast(BaseHandle handle) {
324 Scrollable ret = new Scrollable(NDalicPINVOKE.Scrollable_DownCast(BaseHandle.getCPtr(handle)), true);
325 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
329 public bool IsOvershootEnabled() {
330 bool ret = NDalicPINVOKE.Scrollable_IsOvershootEnabled(swigCPtr);
331 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
335 public void SetOvershootEnabled(bool enable) {
336 NDalicPINVOKE.Scrollable_SetOvershootEnabled(swigCPtr, enable);
337 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
340 public void SetOvershootEffectColor(Vector4 color) {
341 NDalicPINVOKE.Scrollable_SetOvershootEffectColor(swigCPtr, Vector4.getCPtr(color));
342 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
345 public Vector4 GetOvershootEffectColor() {
346 Vector4 ret = new Vector4(NDalicPINVOKE.Scrollable_GetOvershootEffectColor(swigCPtr), true);
347 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
351 public void SetOvershootAnimationSpeed(float pixelsPerSecond) {
352 NDalicPINVOKE.Scrollable_SetOvershootAnimationSpeed(swigCPtr, pixelsPerSecond);
353 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
356 public float GetOvershootAnimationSpeed() {
357 float ret = NDalicPINVOKE.Scrollable_GetOvershootAnimationSpeed(swigCPtr);
358 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
362 internal ScrollableSignal ScrollStartedSignal() {
363 ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollStartedSignal(swigCPtr), false);
364 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
368 internal ScrollableSignal ScrollUpdatedSignal() {
369 ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollUpdatedSignal(swigCPtr), false);
370 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
374 internal ScrollableSignal ScrollCompletedSignal() {
375 ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollCompletedSignal(swigCPtr), false);
376 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
380 public enum PropertyRange {
381 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
382 PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX+1000,
383 ANIMATABLE_PROPERTY_START_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX,
384 ANIMATABLE_PROPERTY_END_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX+1000
387 public Vector4 OvershootEffectColor
391 Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
392 GetProperty( Scrollable.Property.OVERSHOOT_EFFECT_COLOR).Get( temp );
397 SetProperty( Scrollable.Property.OVERSHOOT_EFFECT_COLOR, new Tizen.NUI.PropertyValue( value ) );
400 public float OvershootAnimationSpeed
405 GetProperty( Scrollable.Property.OVERSHOOT_ANIMATION_SPEED).Get( ref temp );
410 SetProperty( Scrollable.Property.OVERSHOOT_ANIMATION_SPEED, new Tizen.NUI.PropertyValue( value ) );
413 public bool OvershootEnabled
418 GetProperty( Scrollable.Property.OVERSHOOT_ENABLED).Get( ref temp );
423 SetProperty( Scrollable.Property.OVERSHOOT_ENABLED, new Tizen.NUI.PropertyValue( value ) );
426 public Vector2 OvershootSize
430 Vector2 temp = new Vector2(0.0f,0.0f);
431 GetProperty( Scrollable.Property.OVERSHOOT_SIZE).Get( temp );
436 SetProperty( Scrollable.Property.OVERSHOOT_SIZE, new Tizen.NUI.PropertyValue( value ) );
439 public int ScrollToAlphaFunction
444 GetProperty( Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION).Get( ref temp );
449 SetProperty( Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION, new Tizen.NUI.PropertyValue( value ) );
452 public Vector2 ScrollRelativePosition
456 Vector2 temp = new Vector2(0.0f,0.0f);
457 GetProperty( Scrollable.Property.SCROLL_RELATIVE_POSITION).Get( temp );
462 SetProperty( Scrollable.Property.SCROLL_RELATIVE_POSITION, new Tizen.NUI.PropertyValue( value ) );
465 public Vector2 ScrollPositionMin
469 Vector2 temp = new Vector2(0.0f,0.0f);
470 GetProperty( Scrollable.Property.SCROLL_POSITION_MIN).Get( temp );
475 SetProperty( Scrollable.Property.SCROLL_POSITION_MIN, new Tizen.NUI.PropertyValue( value ) );
478 public Vector2 ScrollPositionMax
482 Vector2 temp = new Vector2(0.0f,0.0f);
483 GetProperty( Scrollable.Property.SCROLL_POSITION_MAX).Get( temp );
488 SetProperty( Scrollable.Property.SCROLL_POSITION_MAX, new Tizen.NUI.PropertyValue( value ) );
491 public bool CanScrollVertical
496 GetProperty( Scrollable.Property.CAN_SCROLL_VERTICAL).Get( ref temp );
501 SetProperty( Scrollable.Property.CAN_SCROLL_VERTICAL, new Tizen.NUI.PropertyValue( value ) );
504 public bool CanScrollHorizontal
509 GetProperty( Scrollable.Property.CAN_SCROLL_HORIZONTAL).Get( ref temp );
514 SetProperty( Scrollable.Property.CAN_SCROLL_HORIZONTAL, new Tizen.NUI.PropertyValue( value ) );