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();
48 public Size3D CurrentSize
52 return GetCurrentSize();
64 public bool Visibility
77 GetProperty( Actor.Property.OPACITY ).Get( ref temp );
82 SetProperty( Actor.Property.OPACITY, new Dali.Property.Value( value ) );
86 public Vector2 ScreenPosition
90 Vector2 temp = new Vector2( 0.0f, 0.0f );
91 GetProperty( Actor.Property.SCREEN_POSITION ).Get( temp );
96 protected bool PositionUsesAnchorPoint
101 GetProperty( Actor.Property.POSITION_USES_ANCHOR_POINT ).Get( ref temp );
106 SetProperty( Actor.Property.POSITION_USES_ANCHOR_POINT, new Dali.Property.Value( value ) );
110 public bool StateFocusEnable
114 return IsKeyboardFocusable();
118 SetKeyboardFocusable(value);
122 public bool IsOnStage
130 public int SiblingOrder
135 GetProperty( Actor.Property.SIBLING_ORDER ).Get( ref temp );
140 SetProperty( Actor.Property.SIBLING_ORDER, new Dali.Property.Value( value ) );
156 NDalicPINVOKE.Raise(swigCPtr);
157 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
162 NDalicPINVOKE.Lower(swigCPtr);
163 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
166 public void RaiseToTop()
168 NDalicPINVOKE.RaiseToTop(swigCPtr);
169 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
172 public void LowerToBottom()
174 NDalicPINVOKE.LowerToBottom(swigCPtr);
175 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
178 public void RaiseAbove(Actor target)
180 NDalicPINVOKE.RaiseAbove(swigCPtr, Actor.getCPtr(target));
181 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
184 public void LowerBelow(Actor target)
186 NDalicPINVOKE.RaiseAbove(swigCPtr, Actor.getCPtr(target));
187 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
194 %define DALI_ACTOR_EVENTHANDLER_PARAM( NameSpace, ClassName)
196 ACTOR_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
197 ACTOR_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
203 DALI_ACTOR_EVENTHANDLER_PARAM( Dali, Actor);