Inserted the property related code changes through swig .i files.
Modified the examples accordingly.
Change-Id: I659c3e8e3bef5a455b60405459b2744d77cc4fa4
Signed-off-by: Ravi Nanjundappa <nravi.n@samsung.com>
{
return (IntPtr)swigCPtr;
}
- %}
- %enddef
+ public Actor Parent
+ {
+ get
+ {
+ Actor parent = GetParent();
+ return parent;
+ }
+ }
+
+ public bool Vibility
+ {
+ get
+ {
+ bool visibility = IsVisible();
+ return visibility;
+ }
+ }
+
+ public float Opacity
+ {
+ set
+ {
+ SetOpacity(value);
+ }
+ }
+
+ public float CurrentOpacity
+ {
+ get
+ {
+ float ret = GetCurrentOpacity();
+ return ret;
+ }
+ }
+
+ public bool StateFocusEnable
+ {
+ set
+ {
+ SetKeyboardFocusable(value);
+ }
+ get
+ {
+ bool focusable = IsKeyboardFocusable();
+ return focusable;
+ }
+ }
+
+%}
+
+%enddef
%define DALI_ACTOR_EVENTHANDLER_PARAM( NameSpace, ClassName)
- ACTOR_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
- ACTOR_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
+ACTOR_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
+ACTOR_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
- %enddef
+%enddef
- namespace Dali
+namespace Dali
{
DALI_ACTOR_EVENTHANDLER_PARAM( Dali, Actor);
}
*/
%define Animation_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
- %typemap(csimports) NameSpace::ClassName %{
- using System;
- using System.Runtime.InteropServices;
+%typemap(csimports) NameSpace::ClassName %{
+using System;
+using System.Runtime.InteropServices;
+%}
- %}
- %enddef
+%enddef
%define Animation_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
%typemap(cscode) NameSpace::ClassName %{
-
/**
* @brief Event arguments that passed via Finished signal
*
}
- public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
- ClassName ret = new ClassName(cPtr, false);
- if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
- return ret;
+ public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
+ ClassName ret = new ClassName(cPtr, false);
+ if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
+ return ret;
+ }
+
+
+ public float Duration
+ {
+ set
+ {
+ SetDuration(value);
+ }
+ get
+ {
+ float ret = GetDuration();
+ return ret;
+ }
+ }
+
+ public AlphaFunction DefaultAlphaFunction
+ {
+ set
+ {
+ SetDefaultAlphaFunction(value);
+ }
+ get
+ {
+ AlphaFunction ret = GetDefaultAlphaFunction();
+ return ret;
+ }
+ }
+
+ public Animation.State Status
+ {
+ get
+ {
+ Animation.State ret = GetState();
+ return ret;
}
+ }
- %}
+%}
- %enddef
+%enddef
%define DALI_animation_EVENTHANDLER_PARAM( NameSpace, ClassName)
}
}
+ public Vector2 Size
+ {
+ get
+ {
+ Vector2 ret = GetSize();
+ return ret;
+ }
+ }
+
+ public Vector4 BackgroundColor
+ {
+ set
+ {
+ SetBackgroundColor(value);
+ }
+ get
+ {
+ Vector4 ret = GetBackgroundColor();
+ return ret;
+ }
+ }
+
%}
%enddef
Console.WriteLine("Actor name: " + actor.Name);
Stage stage = Stage.GetCurrent();
- stage.SetBackgroundColor( NDalic.WHITE );
+ stage.BackgroundColor = NDalic.WHITE ;
- Vector2 stageSize = stage.GetSize();
+ Vector2 stageSize = stage.Size;
Console.WriteLine("Stage size: " + stageSize.x + ", " + stageSize.y);
stage.Add(actor);
{
Console.WriteLine("Customized Application Initialize event handler");
Stage stage = Stage.GetCurrent();
- stage.SetBackgroundColor( NDalic.WHITE );
+ stage.BackgroundColor = NDalic.WHITE;
stage.Touched += new Dali.Stage.TouchEventHandler(OnStageTouched);
public void AnimationFinished(object source, Animation.FinishedEventArgs e)
{
Console.WriteLine("Customized Animation Finished Event handler");
- Console.WriteLine("Animation finished: duration = " + e.Animation.GetDuration());
+ Console.WriteLine("Animation finished: duration = " + e.Animation.Duration);
}
// Callback for stage touched signal handling
private void CreateScrollView()
{
Stage stage = Stage.GetCurrent();
- stage.SetBackgroundColor(NDalic.WHITE);
+ stage.BackgroundColor = NDalic.WHITE;
// Create a scroll view
_scrollView = new ScrollView();
- Vector2 stageSize = stage.GetSize();
+ Vector2 stageSize = stage.Size;
_scrollView.Size = new Vector3(stageSize.x, stageSize.y, 0.0f);
_scrollView.ParentOrigin = NDalic.ParentOriginCenter;
_scrollView.AnchorPoint = NDalic.AnchorPointCenter;