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 (!Window.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 = Dali.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 = Dali.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 = Dali.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
260 public static readonly int OVERSHOOT_EFFECT_COLOR = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_EFFECT_COLOR_get();
261 public static readonly int OVERSHOOT_ANIMATION_SPEED = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_ANIMATION_SPEED_get();
262 public static readonly int OVERSHOOT_ENABLED = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_ENABLED_get();
263 public static readonly int OVERSHOOT_SIZE = NDalicPINVOKE.Scrollable_Property_OVERSHOOT_SIZE_get();
264 public static readonly int SCROLL_TO_ALPHA_FUNCTION = NDalicPINVOKE.Scrollable_Property_SCROLL_TO_ALPHA_FUNCTION_get();
265 public static readonly int SCROLL_RELATIVE_POSITION = NDalicPINVOKE.Scrollable_Property_SCROLL_RELATIVE_POSITION_get();
266 public static readonly int SCROLL_POSITION_MIN = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_get();
267 public static readonly int SCROLL_POSITION_MIN_X = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_X_get();
268 public static readonly int SCROLL_POSITION_MIN_Y = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MIN_Y_get();
269 public static readonly int SCROLL_POSITION_MAX = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_get();
270 public static readonly int SCROLL_POSITION_MAX_X = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_X_get();
271 public static readonly int SCROLL_POSITION_MAX_Y = NDalicPINVOKE.Scrollable_Property_SCROLL_POSITION_MAX_Y_get();
272 public static readonly int CAN_SCROLL_VERTICAL = NDalicPINVOKE.Scrollable_Property_CAN_SCROLL_VERTICAL_get();
273 public static readonly int CAN_SCROLL_HORIZONTAL = NDalicPINVOKE.Scrollable_Property_CAN_SCROLL_HORIZONTAL_get();
276 public Scrollable() : this(NDalicPINVOKE.new_Scrollable__SWIG_0(), true) {
277 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
280 public Scrollable(Scrollable handle) : this(NDalicPINVOKE.new_Scrollable__SWIG_1(Scrollable.getCPtr(handle)), true) {
281 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
284 internal new static Scrollable DownCast(BaseHandle handle) {
285 Scrollable ret = new Scrollable(NDalicPINVOKE.Scrollable_DownCast(BaseHandle.getCPtr(handle)), true);
286 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
290 private bool IsOvershootEnabled() {
291 bool ret = NDalicPINVOKE.Scrollable_IsOvershootEnabled(swigCPtr);
292 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
296 private void SetOvershootEnabled(bool enable) {
297 NDalicPINVOKE.Scrollable_SetOvershootEnabled(swigCPtr, enable);
298 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
301 private void SetOvershootEffectColor(Vector4 color) {
302 NDalicPINVOKE.Scrollable_SetOvershootEffectColor(swigCPtr, Vector4.getCPtr(color));
303 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
306 private Vector4 GetOvershootEffectColor() {
307 Vector4 ret = new Vector4(NDalicPINVOKE.Scrollable_GetOvershootEffectColor(swigCPtr), true);
308 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
312 private void SetOvershootAnimationSpeed(float pixelsPerSecond) {
313 NDalicPINVOKE.Scrollable_SetOvershootAnimationSpeed(swigCPtr, pixelsPerSecond);
314 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
317 private float GetOvershootAnimationSpeed() {
318 float ret = NDalicPINVOKE.Scrollable_GetOvershootAnimationSpeed(swigCPtr);
319 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
323 internal ScrollableSignal ScrollStartedSignal() {
324 ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollStartedSignal(swigCPtr), false);
325 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
329 internal ScrollableSignal ScrollUpdatedSignal() {
330 ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollUpdatedSignal(swigCPtr), false);
331 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
335 internal ScrollableSignal ScrollCompletedSignal() {
336 ScrollableSignal ret = new ScrollableSignal(NDalicPINVOKE.Scrollable_ScrollCompletedSignal(swigCPtr), false);
337 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
341 public Vector4 OvershootEffectColor
345 Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
346 GetProperty( Scrollable.Property.OVERSHOOT_EFFECT_COLOR).Get( temp );
351 SetProperty( Scrollable.Property.OVERSHOOT_EFFECT_COLOR, new Dali.Property.Value( value ) );
354 public float OvershootAnimationSpeed
359 GetProperty( Scrollable.Property.OVERSHOOT_ANIMATION_SPEED).Get( out temp );
364 SetProperty( Scrollable.Property.OVERSHOOT_ANIMATION_SPEED, new Dali.Property.Value( value ) );
367 public bool OvershootEnabled
372 GetProperty( Scrollable.Property.OVERSHOOT_ENABLED).Get( out temp );
377 SetProperty( Scrollable.Property.OVERSHOOT_ENABLED, new Dali.Property.Value( value ) );
380 public Vector2 OvershootSize
384 Vector2 temp = new Vector2(0.0f,0.0f);
385 GetProperty( Scrollable.Property.OVERSHOOT_SIZE).Get( temp );
390 SetProperty( Scrollable.Property.OVERSHOOT_SIZE, new Dali.Property.Value( value ) );
393 public int ScrollToAlphaFunction
398 GetProperty( Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION).Get( out temp );
403 SetProperty( Scrollable.Property.SCROLL_TO_ALPHA_FUNCTION, new Dali.Property.Value( value ) );
406 public Vector2 ScrollRelativePosition
410 Vector2 temp = new Vector2(0.0f,0.0f);
411 GetProperty( Scrollable.Property.SCROLL_RELATIVE_POSITION).Get( temp );
416 SetProperty( Scrollable.Property.SCROLL_RELATIVE_POSITION, new Dali.Property.Value( value ) );
419 public Vector2 ScrollPositionMin
423 Vector2 temp = new Vector2(0.0f,0.0f);
424 GetProperty( Scrollable.Property.SCROLL_POSITION_MIN).Get( temp );
429 SetProperty( Scrollable.Property.SCROLL_POSITION_MIN, new Dali.Property.Value( value ) );
432 public Vector2 ScrollPositionMax
436 Vector2 temp = new Vector2(0.0f,0.0f);
437 GetProperty( Scrollable.Property.SCROLL_POSITION_MAX).Get( temp );
442 SetProperty( Scrollable.Property.SCROLL_POSITION_MAX, new Dali.Property.Value( value ) );
445 public bool CanScrollVertical
450 GetProperty( Scrollable.Property.CAN_SCROLL_VERTICAL).Get( out temp );
455 SetProperty( Scrollable.Property.CAN_SCROLL_VERTICAL, new Dali.Property.Value( value ) );
458 public bool CanScrollHorizontal
463 GetProperty( Scrollable.Property.CAN_SCROLL_HORIZONTAL).Get( out temp );
468 SetProperty( Scrollable.Property.CAN_SCROLL_HORIZONTAL, new Dali.Property.Value( value ) );