Remove Actor class and move Actor APIs into View
[platform/core/uifw/dali-toolkit.git] / plugins / dali-sharp / sharp / internal / Hover.cs
1 //------------------------------------------------------------------------------
2 // <auto-generated />
3 //
4 // This file was automatically generated by SWIG (http://www.swig.org).
5 // Version 3.0.10
6 //
7 // Do not make changes to this file unless you know what you are doing--modify
8 // the SWIG interface file instead.
9 //------------------------------------------------------------------------------
10
11 namespace Dali {
12
13 public class Hover : global::System.IDisposable {
14   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
15   protected bool swigCMemOwn;
16
17   internal Hover(global::System.IntPtr cPtr, bool cMemoryOwn) {
18     swigCMemOwn = cMemoryOwn;
19     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
20   }
21
22   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Hover obj) {
23     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
24   }
25
26   ~Hover() {
27     DisposeQueue.Instance.Add(this);
28   }
29
30   public virtual void Dispose() {
31     if (!Stage.IsInstalled()) {
32       DisposeQueue.Instance.Add(this);
33       return;
34     }
35
36     lock(this) {
37       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
38         if (swigCMemOwn) {
39           swigCMemOwn = false;
40           NDalicPINVOKE.delete_Hover(swigCPtr);
41         }
42         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
43       }
44       global::System.GC.SuppressFinalize(this);
45     }
46   }
47
48
49   public static Hover GetHoverFromPtr(global::System.IntPtr cPtr) {
50     Hover ret = new Hover(cPtr, false);
51     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
52     return ret;
53   }
54
55   public uint Time
56   {
57     get
58     {
59       return time;
60     }
61   }
62
63   public int GetDeviceId(uint point) {
64     if( point < points.Count )
65     {
66       return points[(int)point].deviceId;
67     }
68     return -1;
69   }
70
71   public PointStateType GetState(uint point) {
72     if( point < points.Count )
73     {
74       return (Dali.PointStateType)(points[(int)point].state);
75     }
76     return PointStateType.FINISHED;
77   }
78
79   public View GetHitView(uint point) {
80     if( point < points.Count )
81     {
82       return points[(int)point].hitView;
83     }
84     else
85     {
86       // Return a native empty handle
87       View view = new View();
88       view.Reset();
89       return view;
90     }
91   }
92
93   public Vector2 GetLocalPosition(uint point) {
94     if( point < points.Count )
95     {
96       return points[(int)point].local;
97     }
98     return new Vector2(0.0f, 0.0f);
99   }
100
101   public Vector2 GetScreenPosition(uint point) {
102     if( point < points.Count )
103     {
104       return points[(int)point].screen;
105     }
106     return new Vector2(0.0f, 0.0f);
107   }
108
109   public Hover() : this(NDalicPINVOKE.new_Hover__SWIG_0(), true) {
110     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
111   }
112
113   public Hover(uint time) : this(NDalicPINVOKE.new_Hover__SWIG_1(time), true) {
114     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
115   }
116
117   private TouchPointContainer points {
118     set {
119       NDalicPINVOKE.Hover_points_set(swigCPtr, TouchPointContainer.getCPtr(value));
120       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
121     } 
122     get {
123       global::System.IntPtr cPtr = NDalicPINVOKE.Hover_points_get(swigCPtr);
124       TouchPointContainer ret = (cPtr == global::System.IntPtr.Zero) ? null : new TouchPointContainer(cPtr, false);
125       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
126       return ret;
127     } 
128   }
129
130   private uint time {
131     set {
132       NDalicPINVOKE.Hover_time_set(swigCPtr, value);
133       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
134     } 
135     get {
136       uint ret = NDalicPINVOKE.Hover_time_get(swigCPtr);
137       if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
138       return ret;
139     } 
140   }
141
142   public uint GetPointCount() {
143     uint ret = NDalicPINVOKE.Hover_GetPointCount(swigCPtr);
144     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
145     return ret;
146   }
147
148   public TouchPoint GetPoint(uint point) {
149     TouchPoint ret = new TouchPoint(NDalicPINVOKE.Hover_GetPoint(swigCPtr, point), false);
150     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
151     return ret;
152   }
153
154 }
155
156 }