2 * Copyright (c) 2017 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 %define ACTOR_EVENTHANDLER_TYPEMAP_EVENTARG(NameSpace, ClassName)
19 %typemap(csimports) NameSpace::ClassName %{
21 using System.Runtime.InteropServices;
26 %define ACTOR_EVENTHANDLER_TYPEMAP_HELPER(NameSpace, ClassName)
27 %typemap(cscode) NameSpace::ClassName %{
29 public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
30 ClassName ret = new ClassName(cPtr, false);
31 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
35 public IntPtr GetPtrfrom ## ClassName ()
37 return (IntPtr)swigCPtr;
40 public Position CurrentPosition
44 return GetCurrentPosition();
52 Size temp = new Size(0.0f,0.0f,0.0f);
53 GetProperty( Actor.Property.SIZE).Get( temp );
54 return new Size2D(temp);
58 SetProperty( Actor.Property.SIZE, new Dali.Property.Value( new Size(value) ) );
62 public Size CurrentSize
66 return GetCurrentSize();
78 public bool Visibility
91 GetProperty( Actor.Property.OPACITY ).Get( ref temp );
96 SetProperty( Actor.Property.OPACITY, new Dali.Property.Value( value ) );
100 public Position2D Position2D
104 Position temp = new Position(0.0f,0.0f,0.0f);
105 GetProperty( Actor.Property.POSITION).Get( temp );
106 return new Position2D(temp);
110 SetProperty( Actor.Property.POSITION, new Dali.Property.Value( new Position(value) ) );
114 public Vector2 ScreenPosition
118 Vector2 temp = new Vector2( 0.0f, 0.0f );
119 GetProperty( Actor.Property.SCREEN_POSITION ).Get( temp );
124 protected bool PositionUsesAnchorPoint
129 GetProperty( Actor.Property.POSITION_USES_ANCHOR_POINT ).Get( ref temp );
134 SetProperty( Actor.Property.POSITION_USES_ANCHOR_POINT, new Dali.Property.Value( value ) );
138 public bool StateFocusEnable
142 return IsKeyboardFocusable();
146 SetKeyboardFocusable(value);
150 public bool IsOnStage
158 public int SiblingOrder
163 GetProperty( Actor.Property.SIBLING_ORDER ).Get( ref temp );
168 SetProperty( Actor.Property.SIBLING_ORDER, new Dali.Property.Value( value ) );
184 NDalicPINVOKE.Raise(swigCPtr);
185 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
190 NDalicPINVOKE.Lower(swigCPtr);
191 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
194 public void RaiseToTop()
196 NDalicPINVOKE.RaiseToTop(swigCPtr);
197 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
200 public void LowerToBottom()
202 NDalicPINVOKE.LowerToBottom(swigCPtr);
203 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
206 public void RaiseAbove(Actor target)
208 NDalicPINVOKE.RaiseAbove(swigCPtr, Actor.getCPtr(target));
209 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
212 public void LowerBelow(Actor target)
214 NDalicPINVOKE.RaiseAbove(swigCPtr, Actor.getCPtr(target));
215 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
222 %define DALI_ACTOR_EVENTHANDLER_PARAM( NameSpace, ClassName)
224 ACTOR_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
225 ACTOR_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
231 DALI_ACTOR_EVENTHANDLER_PARAM( Dali, Actor);