Merge "DALi C# binding - adding property for Animation LoopCount and others." into...
authordongsug song <dongsug.song@samsung.com>
Tue, 25 Oct 2016 13:35:27 +0000 (06:35 -0700)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Tue, 25 Oct 2016 13:35:27 +0000 (06:35 -0700)
plugins/dali-swig/SWIG/dali.i
plugins/dali-swig/SWIG/events/actor-event.i
plugins/dali-swig/SWIG/events/animation-event.i
plugins/dali-swig/SWIG/events/rectinteger.i [new file with mode: 0644]

index e76ba22..e7d633f 100755 (executable)
@@ -200,6 +200,7 @@ using namespace Dali::Toolkit;
 %include events/pangesture-event.i
 %include events/propertynotification-event.i
 %include events/longpressgesture-event.i
+%include events/rectinteger.i
 %include events/resourceimage-event.i
 %include events/scrollable-event.i
 %include events/scrollbar-event.i
index 4a5f51f..7eca466 100644 (file)
       {
         SetOpacity(value);
       }
-    }
-
-   public float CurrentOpacity
-   {
       get
       {
         float ret = GetCurrentOpacity();
         return ret;
       }
-    }
+   }
 
     public bool StateFocusEnable
     {
index 323a6fc..4690317 100644 (file)
@@ -207,56 +207,69 @@ using System.Runtime.InteropServices;
     }
   }
 
-  public void AnimateBy<T,U>(Actor target, U propertyIndex, T relativeValue)
+  public int LoopCount
+  {
+    set
+    {
+      SetLoopCount(value);
+    }
+    get
+    {
+      int ret = GetLoopCount();
+      return ret;
+    }
+  }
+
+  public void AnimateBy<T,U>(Actor target, T propertyIndex, U relativeValue)
   {
        dynamic var = (object)(propertyIndex);
        dynamic obj = (object)(relativeValue);
        AnimateBy(new Property(target, var), new Property.Value(obj));
   }
 
-  public void AnimateBy<T,U>(Actor target, U propertyIndex, T relativeValue, AlphaFunction alpha)
+  public void AnimateBy<T,U>(Actor target, T propertyIndex, U relativeValue, AlphaFunction alpha)
   {
        dynamic var = (object)(propertyIndex);
        dynamic obj = (object)(relativeValue);
        AnimateBy(new Property(target, var), new Property.Value(obj),  alpha);
   }
 
-  public void AnimateBy<T,U>(Actor target, U propertyIndex, T relativeValue, TimePeriod period)
+  public void AnimateBy<T,U>(Actor target, T propertyIndex, U relativeValue, TimePeriod period)
   {
        dynamic var = (object)(propertyIndex);
        dynamic obj = (object)(relativeValue);
        AnimateBy(new Property(target, var), new Property.Value(obj), period);
   }
 
-  public void AnimateBy<T,U>(Actor target, U propertyIndex, T relativeValue, AlphaFunction alpha, TimePeriod period)
+  public void AnimateBy<T,U>(Actor target, T propertyIndex, U relativeValue, AlphaFunction alpha, TimePeriod period)
   {
        dynamic var = (object)(propertyIndex);
        dynamic obj = (object)(relativeValue);
        AnimateBy(new Property(target, var), new Property.Value(obj), alpha, period);
   }
 
-  public void AnimateTo<T,U>(Actor target, U propertyIndex, T destinationValue)
+  public void AnimateTo<T,U>(Actor target, T propertyIndex, U destinationValue)
   {
        dynamic var = (object)(propertyIndex);
        dynamic obj = (object)(destinationValue);
        AnimateTo(new Property(target, var), new Property.Value(obj));
   }
 
-  public void AnimateTo<T,U>(Actor target, U propertyIndex, T destinationValue, AlphaFunction alpha)
+  public void AnimateTo<T,U>(Actor target, T propertyIndex, U destinationValue, AlphaFunction alpha)
   {
        dynamic var = (object)(propertyIndex);
        dynamic obj = (object)(destinationValue);
        AnimateTo(new Property(target, var), new Property.Value(obj), alpha);
   }
 
-  public void AnimateTo<T,U>(Actor target, U propertyIndex, T destinationValue, TimePeriod period)
+  public void AnimateTo<T,U>(Actor target, T propertyIndex, U destinationValue, TimePeriod period)
   {
        dynamic var = (object)(propertyIndex);
        dynamic obj = (object)(destinationValue);
        AnimateTo(new Property(target, var), new Property.Value(obj), period);
   }
 
-  public void AnimateTo<T,U>(Actor target, U propertyIndex, T destinationValue, AlphaFunction alpha, TimePeriod period)
+  public void AnimateTo<T,U>(Actor target, T propertyIndex, U destinationValue, AlphaFunction alpha, TimePeriod period)
   {
        dynamic var = (object)(propertyIndex);
        dynamic obj = (object)(destinationValue);
diff --git a/plugins/dali-swig/SWIG/events/rectinteger.i b/plugins/dali-swig/SWIG/events/rectinteger.i
new file mode 100644 (file)
index 0000000..b89d1f5
--- /dev/null
@@ -0,0 +1,76 @@
+/*
+ * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+%define DALI_RECTINTEGER_PROPERTY_PARAM(NameSpace,ClassName)
+  %typemap(cscode) NameSpace::ClassName %{
+
+  public int X {
+    set {
+      NDalicPINVOKE.RectInteger_x_set(swigCPtr, value);
+      if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+    }
+    get {
+      int ret = NDalicPINVOKE.RectInteger_x_get(swigCPtr);
+      if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+      return ret;
+    }
+  }
+
+  public int Y {
+    set {
+      NDalicPINVOKE.RectInteger_y_set(swigCPtr, value);
+      if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+    }
+    get {
+      int ret = NDalicPINVOKE.RectInteger_y_get(swigCPtr);
+      if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+      return ret;
+    }
+  }
+
+  public int W {
+    set {
+      NDalicPINVOKE.RectInteger_width_set(swigCPtr, value);
+      if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+    }
+    get {
+      int ret = NDalicPINVOKE.RectInteger_width_get(swigCPtr);
+      if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+      return ret;
+    }
+  }
+
+  public int H {
+    set {
+      NDalicPINVOKE.RectInteger_height_set(swigCPtr, value);
+      if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+    }
+    get {
+      int ret = NDalicPINVOKE.RectInteger_height_get(swigCPtr);
+      if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+      return ret;
+    }
+  }
+
+%}
+
+%enddef
+
+namespace Dali
+{
+  DALI_RECTINTEGER_PROPERTY_PARAM( Dali, Rect<int>);
+}