//------------------------------------------------------------------------------ // // // This file was automatically generated by SWIG (http://www.swig.org). // Version 3.0.10 // // Do not make changes to this file unless you know what you are doing--modify // the SWIG interface file instead. //------------------------------------------------------------------------------ namespace Dali { public class Hover : global::System.IDisposable { private global::System.Runtime.InteropServices.HandleRef swigCPtr; protected bool swigCMemOwn; internal Hover(global::System.IntPtr cPtr, bool cMemoryOwn) { swigCMemOwn = cMemoryOwn; swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr); } internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Hover obj) { return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr; } ~Hover() { DisposeQueue.Instance.Add(this); } public virtual void Dispose() { if (!Stage.IsInstalled()) { DisposeQueue.Instance.Add(this); return; } lock(this) { if (swigCPtr.Handle != global::System.IntPtr.Zero) { if (swigCMemOwn) { swigCMemOwn = false; NDalicPINVOKE.delete_Hover(swigCPtr); } swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero); } global::System.GC.SuppressFinalize(this); } } public static Hover GetHoverFromPtr(global::System.IntPtr cPtr) { Hover ret = new Hover(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } public uint Time { get { return time; } } public int GetDeviceId(uint point) { if( point < points.Count ) { return points[(int)point].deviceId; } return -1; } public PointStateType GetState(uint point) { if( point < points.Count ) { return (Dali.PointStateType)(points[(int)point].state); } return PointStateType.FINISHED; } public View GetHitView(uint point) { if( point < points.Count ) { return points[(int)point].hitView; } else { // Return a native empty handle View view = new View(); view.Reset(); return view; } } public Vector2 GetLocalPosition(uint point) { if( point < points.Count ) { return points[(int)point].local; } return new Vector2(0.0f, 0.0f); } public Vector2 GetScreenPosition(uint point) { if( point < points.Count ) { return points[(int)point].screen; } return new Vector2(0.0f, 0.0f); } public Hover() : this(NDalicPINVOKE.new_Hover__SWIG_0(), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } public Hover(uint time) : this(NDalicPINVOKE.new_Hover__SWIG_1(time), true) { if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } private TouchPointContainer points { set { NDalicPINVOKE.Hover_points_set(swigCPtr, TouchPointContainer.getCPtr(value)); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } get { global::System.IntPtr cPtr = NDalicPINVOKE.Hover_points_get(swigCPtr); TouchPointContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new TouchPointContainer(cPtr, false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } private uint time { set { NDalicPINVOKE.Hover_time_set(swigCPtr, value); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); } get { uint ret = NDalicPINVOKE.Hover_time_get(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } public uint GetPointCount() { uint ret = NDalicPINVOKE.Hover_GetPointCount(swigCPtr); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } public TouchPoint GetPoint(uint point) { TouchPoint ret = new TouchPoint(NDalicPINVOKE.Hover_GetPoint(swigCPtr, point), false); if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve(); return ret; } } }