Add C# bindings for Actor's POSITION_USES_ANCHOR_POINT property 81/118281/2
authorAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 9 Mar 2017 18:12:34 +0000 (18:12 +0000)
committerAdeel Kazmi <adeel.kazmi@samsung.com>
Thu, 9 Mar 2017 18:46:12 +0000 (18:46 +0000)
Change-Id: Ibb229a530b8c6ef7ddfe8d5e71ee75e689ffcaeb

plugins/dali-swig/SWIG/devel-properties.i
plugins/dali-swig/SWIG/events/actor-event.i
plugins/dali-swig/manual/cpp/devel-property-wrap.cpp
plugins/dali-swig/manual/csharp/ManualPINVOKE.cs
plugins/dali-swig/manual/csharp/View.cs

index ac9f032..30a2dfc 100755 (executable)
@@ -30,6 +30,7 @@
   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();
   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();
+  public static readonly int POSITION_USES_ANCHOR_POINT = NDalicManualPINVOKE.Actor_Property_POSITION_USES_ANCHOR_POINT_get();
 %}
 
 %typemap(cscode) Dali::Toolkit::Control::Property %{
 %}
 
 %typemap(cscode) Dali::Toolkit::Control::Property %{
index 273ec47..fbf5a8e 100755 (executable)
@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
       }
     }
 
       }
     }
 
-   public Vector2 ScreenPosition
-   {
+    public Vector2 ScreenPosition
+    {
       get
       {
         Vector2 temp = new Vector2( 0.0f, 0.0f );
         GetProperty( Actor.Property.SCREEN_POSITION ).Get( temp );
         return temp;
       }
       get
       {
         Vector2 temp = new Vector2( 0.0f, 0.0f );
         GetProperty( Actor.Property.SCREEN_POSITION ).Get( temp );
         return temp;
       }
-   }
+    }
 
 
-    public bool StateFocusEnable
+    protected bool PositionUsesAnchorPoint
     {
     {
+      get
+      {
+        bool temp = false;
+        GetProperty( Actor.Property.POSITION_USES_ANCHOR_POINT ).Get( ref temp );
+        return temp;
+      }
       set
       {
       set
       {
-        SetKeyboardFocusable(value);
+        SetProperty( Actor.Property.POSITION_USES_ANCHOR_POINT, new Dali.Property.Value( value ) );
       }
       }
+    }
+
+    public bool StateFocusEnable
+    {
       get
       {
         return IsKeyboardFocusable();
       }
       get
       {
         return IsKeyboardFocusable();
       }
+      set
+      {
+        SetKeyboardFocusable(value);
+      }
     }
 
     public bool IsOnStage
     }
 
     public bool IsOnStage
index f4fffbd..a1d85dd 100755 (executable)
@@ -48,6 +48,11 @@ SWIGEXPORT int SWIGSTDCALL CSharp_Actor_Property_SCREEN_POSITION_get() {
   return Dali::DevelActor::Property::SCREEN_POSITION;
 }
 
   return Dali::DevelActor::Property::SCREEN_POSITION;
 }
 
+SWIGEXPORT int SWIGSTDCALL CSharp_Actor_Property_POSITION_USES_ANCHOR_POINT_get() {
+
+  return Dali::DevelActor::Property::POSITION_USES_ANCHOR_POINT;
+}
+
 SWIGEXPORT int SWIGSTDCALL CSharp_View_Property_TOOLTIP_get() {
   int jresult ;
   int result;
 SWIGEXPORT int SWIGSTDCALL CSharp_View_Property_TOOLTIP_get() {
   int jresult ;
   int result;
index f439851..6694174 100755 (executable)
@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright (c) 2016 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 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.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -196,6 +196,9 @@ namespace Dali
         [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_Actor_Property_SCREEN_POSITION_get")]
         public static extern int Actor_Property_SCREEN_POSITION_get();
 
+        [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_Actor_Property_POSITION_USES_ANCHOR_POINT_get")]
+        public static extern int Actor_Property_POSITION_USES_ANCHOR_POINT_get();
+
         [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_View_Property_TOOLTIP_get")]
         public static extern int View_Property_TOOLTIP_get();
 
         [global::System.Runtime.InteropServices.DllImport("NDalic", EntryPoint="CSharp_View_Property_TOOLTIP_get")]
         public static extern int View_Property_TOOLTIP_get();
 
index e4b1a02..fbc408f 100644 (file)
@@ -28,6 +28,9 @@ public class View : CustomActor {
 
     // Register this instance of view in the view registry.
     ViewRegistry.RegisterView(this);
 
     // Register this instance of view in the view registry.
     ViewRegistry.RegisterView(this);
+
+    // By default, we do not want the position to use the anchor point
+    this.PositionUsesAnchorPoint = false;
   }
 
   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj) {
   }
 
   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(View obj) {