Merge "Removed unused method GetTexture form test-actor-utils.h" into devel/master
[platform/core/uifw/dali-toolkit.git] / plugins / dali-swig / SWIG / gestures / hover.i
1 %rename(Hover) Dali::HoverEvent;
2
3 %csmethodmodifiers Dali::HoverEvent::points "private";
4 %csmethodmodifiers Dali::HoverEvent::time "private";
5
6 %typemap(cscode) Dali::HoverEvent %{
7   public static Hover GetHoverFromPtr(global::System.IntPtr cPtr) {
8     Hover ret = new Hover(cPtr, false);
9     if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
10     return ret;
11   }
12
13   public uint GetTime() {
14     return time;
15   }
16
17   public int GetDeviceId(uint point) {
18     if( point < points.Count )
19     {
20       return points[(int)point].deviceId;
21     }
22     return -1;
23   }
24
25   public PointStateType GetState(uint point) {
26     if( point < points.Count )
27     {
28       return (Dali.PointStateType)(points[(int)point].state);
29     }
30     return PointStateType.FINISHED;
31   }
32
33   public Actor GetHitActor(uint point) {
34     if( point < points.Count )
35     {
36       return points[(int)point].hitActor;
37     }
38     else
39     {
40       // Return a native empty handle
41       Actor actor = new Actor();
42       actor.Reset();
43       return actor;
44     }
45   }
46
47   public Vector2 GetLocalPosition(uint point) {
48     if( point < points.Count )
49     {
50       return points[(int)point].local;
51     }
52     return new Vector2(0.0f, 0.0f);
53   }
54
55   public Vector2 GetScreenPosition(uint point) {
56     if( point < points.Count )
57     {
58       return points[(int)point].screen;
59     }
60     return new Vector2(0.0f, 0.0f);
61   }
62 %}