From d6d362462e51eea645d7ec1fe1db3af58bb306a8 Mon Sep 17 00:00:00 2001 From: Agnelo Vaz Date: Wed, 8 Mar 2017 18:02:37 +0000 Subject: [PATCH] Add C# Bindings for Actor ScreenPosition Change-Id: I1ee5254998a258a2e8ca32e88533bd00daca6e59 --- plugins/dali-swig/SWIG/devel-properties.i | 1 + plugins/dali-swig/SWIG/events/actor-event.i | 10 ++++++++++ plugins/dali-swig/manual/cpp/devel-property-wrap.cpp | 19 ++++++++----------- plugins/dali-swig/manual/csharp/ManualPINVOKE.cs | 3 +++ 4 files changed, 22 insertions(+), 11 deletions(-) diff --git a/plugins/dali-swig/SWIG/devel-properties.i b/plugins/dali-swig/SWIG/devel-properties.i index 2b24a7c..ac9f032 100755 --- a/plugins/dali-swig/SWIG/devel-properties.i +++ b/plugins/dali-swig/SWIG/devel-properties.i @@ -29,6 +29,7 @@ %typemap(cscode) Dali::Actor::Property %{ public static readonly int SIBLING_ORDER = NDalicManualPINVOKE.Actor_Property_SIBLING_ORDER_get(); public static readonly int OPACITY = NDalicManualPINVOKE.Actor_Property_OPACITY_get(); + public static readonly int SCREEN_POSITION = NDalicManualPINVOKE.Actor_Property_SCREEN_POSITION_get(); %} %typemap(cscode) Dali::Toolkit::Control::Property %{ diff --git a/plugins/dali-swig/SWIG/events/actor-event.i b/plugins/dali-swig/SWIG/events/actor-event.i index a2fa54e..273ec47 100755 --- a/plugins/dali-swig/SWIG/events/actor-event.i +++ b/plugins/dali-swig/SWIG/events/actor-event.i @@ -83,6 +83,16 @@ } } + public Vector2 ScreenPosition + { + get + { + Vector2 temp = new Vector2( 0.0f, 0.0f ); + GetProperty( Actor.Property.SCREEN_POSITION ).Get( temp ); + return temp; + } + } + public bool StateFocusEnable { set diff --git a/plugins/dali-swig/manual/cpp/devel-property-wrap.cpp b/plugins/dali-swig/manual/cpp/devel-property-wrap.cpp index 4e96f02..89005b4 100755 --- a/plugins/dali-swig/manual/cpp/devel-property-wrap.cpp +++ b/plugins/dali-swig/manual/cpp/devel-property-wrap.cpp @@ -34,21 +34,18 @@ extern "C" { #endif SWIGEXPORT int SWIGSTDCALL CSharp_Actor_Property_SIBLING_ORDER_get() { - int jresult ; - int result; - result = (int)Dali::DevelActor::Property::SIBLING_ORDER; - jresult = (int)result; - return jresult; + return Dali::DevelActor::Property::SIBLING_ORDER; } -SWIGEXPORT float SWIGSTDCALL CSharp_Actor_Property_OPACITY_get() { - int jresult ; - int result; +SWIGEXPORT int SWIGSTDCALL CSharp_Actor_Property_OPACITY_get() { - result = (float)Dali::DevelActor::Property::OPACITY; - jresult = (int)result; - return jresult; + return Dali::DevelActor::Property::OPACITY; +} + +SWIGEXPORT int SWIGSTDCALL CSharp_Actor_Property_SCREEN_POSITION_get() { + + return Dali::DevelActor::Property::SCREEN_POSITION; } SWIGEXPORT int SWIGSTDCALL CSharp_View_Property_TOOLTIP_get() { diff --git a/plugins/dali-swig/manual/csharp/ManualPINVOKE.cs b/plugins/dali-swig/manual/csharp/ManualPINVOKE.cs index ea80496..b627299 100755 --- a/plugins/dali-swig/manual/csharp/ManualPINVOKE.cs +++ b/plugins/dali-swig/manual/csharp/ManualPINVOKE.cs @@ -193,6 +193,9 @@ namespace Dali [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Actor_Property_OPACITY_get")] public static extern int Actor_Property_OPACITY_get(); + [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Actor_Property_SCREEN_POSITION_get")] + public static extern int Actor_Property_SCREEN_POSITION_get(); + [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_View_Property_TOOLTIP_get")] public static extern int View_Property_TOOLTIP_get(); -- 2.7.4