From 1bce7020a14529b22c72b115f0ba63122d1413a6 Mon Sep 17 00:00:00 2001 From: Richard Huang Date: Tue, 21 Feb 2017 11:59:23 +0000 Subject: [PATCH] C# binding for Actor Opacity property Change-Id: I955ccd248dc67a409b736f6ce724da11f02908d6 --- plugins/dali-swig/SWIG/devel-properties.i | 1 + plugins/dali-swig/SWIG/events/actor-event.i | 20 +++++++++++--------- plugins/dali-swig/manual/cpp/devel-property-wrap.cpp | 9 +++++++++ plugins/dali-swig/manual/csharp/ManualPINVOKE.cs | 3 +++ 4 files changed, 24 insertions(+), 9 deletions(-) diff --git a/plugins/dali-swig/SWIG/devel-properties.i b/plugins/dali-swig/SWIG/devel-properties.i index 4d277de..2b24a7c 100755 --- a/plugins/dali-swig/SWIG/devel-properties.i +++ b/plugins/dali-swig/SWIG/devel-properties.i @@ -28,6 +28,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(); %} %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 93b5c15..f4d6d1c 100755 --- a/plugins/dali-swig/SWIG/events/actor-event.i +++ b/plugins/dali-swig/SWIG/events/actor-event.i @@ -67,19 +67,21 @@ { return IsVisible(); } - } + } - public float Opacity - { - set + public float Opacity + { + get { - SetOpacity(value); + float temp = 0; + GetProperty( Actor.Property.OPACITY ).Get( ref temp ); + return temp; } - get + set { - return GetCurrentOpacity(); + SetProperty( Actor.Property.OPACITY, new Dali.Property.Value( value ) ); } - } + } public bool StateFocusEnable { @@ -106,7 +108,7 @@ get { int temp = 0; - GetProperty( Actor.Property.SIBLING_ORDER).Get( ref temp ); + GetProperty( Actor.Property.SIBLING_ORDER ).Get( ref temp ); return temp; } set diff --git a/plugins/dali-swig/manual/cpp/devel-property-wrap.cpp b/plugins/dali-swig/manual/cpp/devel-property-wrap.cpp index bbadec9..4e96f02 100755 --- a/plugins/dali-swig/manual/cpp/devel-property-wrap.cpp +++ b/plugins/dali-swig/manual/cpp/devel-property-wrap.cpp @@ -42,6 +42,15 @@ SWIGEXPORT int SWIGSTDCALL CSharp_Actor_Property_SIBLING_ORDER_get() { return jresult; } +SWIGEXPORT float SWIGSTDCALL CSharp_Actor_Property_OPACITY_get() { + int jresult ; + int result; + + result = (float)Dali::DevelActor::Property::OPACITY; + jresult = (int)result; + return jresult; +} + SWIGEXPORT int SWIGSTDCALL CSharp_View_Property_TOOLTIP_get() { int jresult ; int result; diff --git a/plugins/dali-swig/manual/csharp/ManualPINVOKE.cs b/plugins/dali-swig/manual/csharp/ManualPINVOKE.cs index 82c2f2f..ea80496 100755 --- a/plugins/dali-swig/manual/csharp/ManualPINVOKE.cs +++ b/plugins/dali-swig/manual/csharp/ManualPINVOKE.cs @@ -190,6 +190,9 @@ namespace Dali [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Actor_Property_SIBLING_ORDER_get")] public static extern int Actor_Property_SIBLING_ORDER_get(); + [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_View_Property_TOOLTIP_get")] public static extern int View_Property_TOOLTIP_get(); -- 2.7.4