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;
32 public override void Dispose() {
34 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
37 NDalicPINVOKE.delete_Scrollable(swigCPtr);
39 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
41 global::System.GC.SuppressFinalize(this);
47 public class StartedEventArgs : EventArgs
49 private Vector2 _vector2;
51 public Vector2 Vector2
64 public class UpdatedEventArgs : EventArgs
66 private Vector2 _vector2;
68 public Vector2 Vector2
81 public class CompletedEventArgs : EventArgs
83 private Vector2 _vector2;
85 public Vector2 Vector2
98 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
99 private delegate void StartedCallbackDelegate(IntPtr vector2);
100 private DaliEventHandler<object,StartedEventArgs> _scrollableStartedEventHandler;
101 private StartedCallbackDelegate _scrollableStartedCallbackDelegate;
103 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
104 private delegate void UpdatedCallbackDelegate(IntPtr vector2);
105 private DaliEventHandler<object,UpdatedEventArgs> _scrollableUpdatedEventHandler;
106 private UpdatedCallbackDelegate _scrollableUpdatedCallbackDelegate;
108 [UnmanagedFunctionPointer(CallingConvention.StdCall)]
109 private delegate void CompletedCallbackDelegate(IntPtr vector2);
110 private DaliEventHandler<object,CompletedEventArgs> _scrollableCompletedEventHandler;
111 private CompletedCallbackDelegate _scrollableCompletedCallbackDelegate;
113 public event DaliEventHandler<object,StartedEventArgs> ScrollStarted
119 // Restricted to only one listener
120 if (_scrollableStartedEventHandler == null)
122 _scrollableStartedEventHandler += value;
124 _scrollableStartedCallbackDelegate = new StartedCallbackDelegate(OnStarted);
125 this.ScrollStartedSignal().Connect(_scrollableStartedCallbackDelegate);
134 if (_scrollableStartedEventHandler != null)
136 this.ScrollStartedSignal().Disconnect(_scrollableStartedCallbackDelegate);
139 _scrollableStartedEventHandler -= value;
144 private void OnStarted(IntPtr vector2)
146 StartedEventArgs e = new StartedEventArgs();
148 // Populate all members of "e" (StartedEventArgs) with real data
149 e.Vector2 = Dali.Vector2.GetVector2FromPtr(vector2);
151 if (_scrollableStartedEventHandler != null)
153 //here we send all data to user event handlers
154 _scrollableStartedEventHandler(this, e);
159 public event DaliEventHandler<object,UpdatedEventArgs> ScrollUpdated
165 // Restricted to only one listener
166 if (_scrollableUpdatedEventHandler == null)
168 _scrollableUpdatedEventHandler += value;
170 _scrollableUpdatedCallbackDelegate = new UpdatedCallbackDelegate(OnUpdated);
171 this.ScrollUpdatedSignal().Connect(_scrollableUpdatedCallbackDelegate);
180 if (_scrollableUpdatedEventHandler != null)
182 this.ScrollUpdatedSignal().Disconnect(_scrollableUpdatedCallbackDelegate);
185 _scrollableUpdatedEventHandler -= value;
190 private void OnUpdated(IntPtr vector2)
192 UpdatedEventArgs e = new UpdatedEventArgs();
194 // Populate all members of "e" (UpdatedEventArgs) with real data
195 e.Vector2 = Dali.Vector2.GetVector2FromPtr(vector2);
197 if (_scrollableUpdatedEventHandler != null)
199 //here we send all data to user event handlers
200 _scrollableUpdatedEventHandler(this, e);
205 public event DaliEventHandler<object,CompletedEventArgs> ScrollCompleted
211 // Restricted to only one listener
212 if (_scrollableCompletedEventHandler == null)
214 _scrollableCompletedEventHandler += value;
216 _scrollableCompletedCallbackDelegate = new CompletedCallbackDelegate(OnCompleted);
217 this.ScrollCompletedSignal().Connect(_scrollableCompletedCallbackDelegate);
226 if (_scrollableCompletedEventHandler != null)
228 this.ScrollCompletedSignal().Disconnect(_scrollableCompletedCallbackDelegate);
231 _scrollableCompletedEventHandler -= value;
236 private void OnCompleted(IntPtr vector2)
238 CompletedEventArgs e = new CompletedEventArgs();
240 // Populate all members of "e" (CompletedEventArgs) with real data
241 e.Vector2 = Dali.Vector2.GetVector2FromPtr(vector2);
243 if (_scrollableCompletedEventHandler != null)
245 //here we send all data to user event handlers
246 _scrollableCompletedEventHandler(this, e);
252 public class Property : global::System.IDisposable {
253 private global::System.Runtime.InteropServices.HandleRef swigCPtr;
254 protected bool swigCMemOwn;
256 internal Property(global::System.IntPtr cPtr, bool cMemoryOwn) {
257 swigCMemOwn = cMemoryOwn;
258 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
261 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Property obj) {
262 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
269 public virtual void Dispose() {
271 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
274 NDalicPINVOKE.delete_Scrollable_Property(swigCPtr);
276 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
278 global::System.GC.SuppressFinalize(this);
282 public Property() : this(NDalicPINVOKE.new_Scrollable_Property(), true) {
283 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
286 public static readonly int OVERSHOOT_EFFECT_COLOR = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_EFFECT_COLOR_get();
287 public static readonly int OVERSHOOT_ANIMATION_SPEED = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_ANIMATION_SPEED_get();
288 public static readonly int OVERSHOOT_ENABLED = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_ENABLED_get();
289 public static readonly int OVERSHOOT_SIZE = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_SIZE_get();
290 public static readonly int SCROLL_TO_ALPHA_FUNCTION = NDalicPINVOKE.Scrollable_Property_SCROLL_TO_ALPHA_FUNCTION_get();
291 public static readonly int SCROLL_RELATIVE_POSITION = NDalicPINVOKE.Scrollable_Property_SCROLL_RELATIVE_POSITION_get();
292 public static readonly int SCROLL_POSITION_MIN = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_get();
293 public static readonly int SCROLL_POSITION_MIN_X = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_X_get();
294 public static readonly int SCROLL_POSITION_MIN_Y = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_Y_get();
295 public static readonly int SCROLL_POSITION_MAX = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_get();
296 public static readonly int SCROLL_POSITION_MAX_X = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_X_get();
297 public static readonly int SCROLL_POSITION_MAX_Y = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_Y_get();
298 public static readonly int CAN_SCROLL_VERTICAL = NDalicPINVOKE.Scrollable_Property_CAN_SCROLL_VERTICAL_get();
299 public static readonly int CAN_SCROLL_HORIZONTAL = NDalicPINVOKE.Scrollable_Property_CAN_SCROLL_HORIZONTAL_get();
303 public Scrollable() : this(NDalicPINVOKE.new_Scrollable__SWIG_0(), true) {
304 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
307 public Scrollable(Scrollable handle) : this(NDalicPINVOKE.new_Scrollable__SWIG_1(Scrollable.getCPtr(handle)), true) {
308 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
311 public Scrollable Assign(Scrollable handle) {
312 Scrollable ret = new Scrollable(NDalicPINVOKE.Scrollable_Assign(swigCPtr, Scrollable.getCPtr(handle)), false);
313 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
317 public new static Scrollable DownCast(BaseHandle handle) {
318 Scrollable ret = new Scrollable(NDalicPINVOKE.Scrollable_DownCast(BaseHandle.getCPtr(handle)), true);
319 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
323 public bool IsOvershootEnabled() {
324 bool ret = NDalicPINVOKE.Scrollable_IsOvershootEnabled(swigCPtr);
325 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
329 public void SetOvershootEnabled(bool enable) {
330 NDalicPINVOKE.Scrollable_SetOvershootEnabled(swigCPtr, enable);
331 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
334 public void SetOvershootEffectColor(Vector4 color) {
335 NDalicPINVOKE.Scrollable_SetOvershootEffectColor(swigCPtr, Vector4.getCPtr(color));
336 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
339 public Vector4 GetOvershootEffectColor() {
340 Vector4 ret = new Vector4(NDalicPINVOKE.Scrollable_GetOvershootEffectColor(swigCPtr), true);
341 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
345 public void SetOvershootAnimationSpeed(float pixelsPerSecond) {
346 NDalicPINVOKE.Scrollable_SetOvershootAnimationSpeed(swigCPtr, pixelsPerSecond);
347 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
350 public float GetOvershootAnimationSpeed() {
351 float ret = NDalicPINVOKE.Scrollable_GetOvershootAnimationSpeed(swigCPtr);
352 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
356 public ScrollableSignal ScrollStartedSignal() {
357 ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollStartedSignal(swigCPtr), false);
358 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
362 public ScrollableSignal ScrollUpdatedSignal() {
363 ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollUpdatedSignal(swigCPtr), false);
364 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
368 public ScrollableSignal ScrollCompletedSignal() {
369 ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollCompletedSignal(swigCPtr), false);
370 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
374 public enum PropertyRange {
375 PROPERTY_START_INDEX = PropertyRanges.PROPERTY_REGISTRATION_START_INDEX,
376 PROPERTY_END_INDEX = View.PropertyRange.PROPERTY_START_INDEX+1000,
377 ANIMATABLE_PROPERTY_START_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX,
378 ANIMATABLE_PROPERTY_END_INDEX = PropertyRanges.ANIMATABLE_PROPERTY_REGISTRATION_START_INDEX+1000
381 public Vector4 OvershootEffectColor
385 Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
386 GetProperty( Scrollable.Property.OVERSHOOT_EFFECT_COLOR).Get( temp );
391 SetProperty( Scrollable.Property.OVERSHOOT_EFFECT_COLOR, new Dali.Property.Value( value ) );
394 public float OvershootAnimationSpeed
399 GetProperty( Scrollable.Property.OVERSHOOT_ANIMATION_SPEED).Get( ref temp );
404 SetProperty( Scrollable.Property.OVERSHOOT_ANIMATION_SPEED, new Dali.Property.Value( value ) );
407 public bool OvershootEnabled
412 GetProperty( Scrollable.Property.OVERSHOOT_ENABLED).Get( ref temp );
417 SetProperty( Scrollable.Property.OVERSHOOT_ENABLED, new Dali.Property.Value( value ) );
420 public Vector2 OvershootSize
424 Vector2 temp = new Vector2(0.0f,0.0f);
425 GetProperty( Scrollable.Property.OVERSHOOT_SIZE).Get( temp );
430 SetProperty( Scrollable.Property.OVERSHOOT_SIZE, new Dali.Property.Value( value ) );
433 public int ScrollToAlphaFunction
438 GetProperty( Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION).Get( ref temp );
443 SetProperty( Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION, new Dali.Property.Value( value ) );
446 public Vector2 ScrollRelativePosition
450 Vector2 temp = new Vector2(0.0f,0.0f);
451 GetProperty( Scrollable.Property.SCROLL_RELATIVE_POSITION).Get( temp );
456 SetProperty( Scrollable.Property.SCROLL_RELATIVE_POSITION, new Dali.Property.Value( value ) );
459 public Vector2 ScrollPositionMin
463 Vector2 temp = new Vector2(0.0f,0.0f);
464 GetProperty( Scrollable.Property.SCROLL_POSITION_MIN).Get( temp );
469 SetProperty( Scrollable.Property.SCROLL_POSITION_MIN, new Dali.Property.Value( value ) );
472 public Vector2 ScrollPositionMax
476 Vector2 temp = new Vector2(0.0f,0.0f);
477 GetProperty( Scrollable.Property.SCROLL_POSITION_MAX).Get( temp );
482 SetProperty( Scrollable.Property.SCROLL_POSITION_MAX, new Dali.Property.Value( value ) );
485 public bool CanScrollVertical
490 GetProperty( Scrollable.Property.CAN_SCROLL_VERTICAL).Get( ref temp );
495 SetProperty( Scrollable.Property.CAN_SCROLL_VERTICAL, new Dali.Property.Value( value ) );
498 public bool CanScrollHorizontal
503 GetProperty( Scrollable.Property.CAN_SCROLL_HORIZONTAL).Get( ref temp );
508 SetProperty( Scrollable.Property.CAN_SCROLL_HORIZONTAL, new Dali.Property.Value( value ) );