2 * Copyright (c) 2016 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;
44 Actor parent = GetParent();
49 public bool Visibility
53 bool visibility = IsVisible();
66 float ret = GetCurrentOpacity();
71 public bool StateFocusEnable
75 SetKeyboardFocusable(value);
79 bool focusable = IsKeyboardFocusable();
94 /* Properties earlier added by Ruby Script */
96 public Dali.CSharp.Position ParentOrigin
100 Vector3 temp = new Vector3(0.0f,0.0f,0.0f);
101 GetProperty( Actor.Property.PARENT_ORIGIN).Get( temp );
102 Dali.CSharp.Position ret = new Dali.CSharp.Position(temp.x, temp.y, temp.z);
107 SetProperty( Actor.Property.PARENT_ORIGIN, new Dali.Property.Value( value ) );
110 public float ParentOriginX
115 GetProperty( Actor.Property.PARENT_ORIGIN_X).Get( ref temp );
120 SetProperty( Actor.Property.PARENT_ORIGIN_X, new Dali.Property.Value( value ) );
123 public float ParentOriginY
128 GetProperty( Actor.Property.PARENT_ORIGIN_Y).Get( ref temp );
133 SetProperty( Actor.Property.PARENT_ORIGIN_Y, new Dali.Property.Value( value ) );
136 public float ParentOriginZ
141 GetProperty( Actor.Property.PARENT_ORIGIN_Z).Get( ref temp );
146 SetProperty( Actor.Property.PARENT_ORIGIN_Z, new Dali.Property.Value( value ) );
149 public Dali.CSharp.Position AnchorPoint
153 Vector3 temp = new Vector3(0.0f,0.0f,0.0f);
154 GetProperty( Actor.Property.ANCHOR_POINT).Get( temp );
155 Dali.CSharp.Position ret = new Dali.CSharp.Position(temp.x, temp.y, temp.z);
160 SetProperty( Actor.Property.ANCHOR_POINT, new Dali.Property.Value( value ) );
163 public float AnchorPointX
168 GetProperty( Actor.Property.ANCHOR_POINT_X).Get( ref temp );
173 SetProperty( Actor.Property.ANCHOR_POINT_X, new Dali.Property.Value( value ) );
176 public float AnchorPointY
181 GetProperty( Actor.Property.ANCHOR_POINT_Y).Get( ref temp );
186 SetProperty( Actor.Property.ANCHOR_POINT_Y, new Dali.Property.Value( value ) );
189 public float AnchorPointZ
194 GetProperty( Actor.Property.ANCHOR_POINT_Z).Get( ref temp );
199 SetProperty( Actor.Property.ANCHOR_POINT_Z, new Dali.Property.Value( value ) );
202 public Dali.CSharp.Position Size
206 Vector3 temp = new Vector3(0.0f,0.0f,0.0f);
207 GetProperty( Actor.Property.SIZE).Get( temp );
208 Dali.CSharp.Position ret = new Dali.CSharp.Position(temp.x, temp.y, temp.z);
213 SetProperty( Actor.Property.SIZE, new Dali.Property.Value( value ) );
216 public float SizeWidth
221 GetProperty( Actor.Property.SIZE_WIDTH).Get( ref temp );
226 SetProperty( Actor.Property.SIZE_WIDTH, new Dali.Property.Value( value ) );
229 public float SizeHeight
234 GetProperty( Actor.Property.SIZE_HEIGHT).Get( ref temp );
239 SetProperty( Actor.Property.SIZE_HEIGHT, new Dali.Property.Value( value ) );
242 public float SizeDepth
247 GetProperty( Actor.Property.SIZE_DEPTH).Get( ref temp );
252 SetProperty( Actor.Property.SIZE_DEPTH, new Dali.Property.Value( value ) );
255 public Dali.CSharp.Position Position
259 Vector3 temp = new Vector3(0.0f,0.0f,0.0f);
260 GetProperty( Actor.Property.POSITION).Get( temp );
261 Dali.CSharp.Position ret = new Dali.CSharp.Position(temp.x, temp.y, temp.z);
266 SetProperty( Actor.Property.POSITION, new Dali.Property.Value( value ) );
269 public float PositionX
274 GetProperty( Actor.Property.POSITION_X).Get( ref temp );
279 SetProperty( Actor.Property.POSITION_X, new Dali.Property.Value( value ) );
282 public float PositionY
287 GetProperty( Actor.Property.POSITION_Y).Get( ref temp );
292 SetProperty( Actor.Property.POSITION_Y, new Dali.Property.Value( value ) );
295 public float PositionZ
300 GetProperty( Actor.Property.POSITION_Z).Get( ref temp );
305 SetProperty( Actor.Property.POSITION_Z, new Dali.Property.Value( value ) );
308 public Dali.CSharp.Position WorldPosition
312 Vector3 temp = new Vector3(0.0f,0.0f,0.0f);
313 GetProperty( Actor.Property.WORLD_POSITION).Get( temp );
314 Dali.CSharp.Position ret = new Dali.CSharp.Position(temp.x, temp.y, temp.z);
317 } public float WorldPositionX
322 GetProperty( Actor.Property.WORLD_POSITION_X).Get( ref temp );
325 } public float WorldPositionY
330 GetProperty( Actor.Property.WORLD_POSITION_Y).Get( ref temp );
333 } public float WorldPositionZ
338 GetProperty( Actor.Property.WORLD_POSITION_Z).Get( ref temp );
341 } public Quaternion Orientation
345 Quaternion temp = new Quaternion();
346 GetProperty( Actor.Property.ORIENTATION).Get( temp );
351 SetProperty( Actor.Property.ORIENTATION, new Dali.Property.Value( value ) );
354 public Quaternion WorldOrientation
358 Quaternion temp = new Quaternion();
359 GetProperty( Actor.Property.WORLD_ORIENTATION).Get( temp );
362 } public Dali.CSharp.Position Scale
366 Vector3 temp = new Vector3(0.0f,0.0f,0.0f);
367 GetProperty( Actor.Property.SCALE).Get( temp );
368 Dali.CSharp.Position ret = new Dali.CSharp.Position(temp.x, temp.y, temp.z);
373 SetProperty( Actor.Property.SCALE, new Dali.Property.Value( value ) );
381 GetProperty( Actor.Property.SCALE_X).Get( ref temp );
386 SetProperty( Actor.Property.SCALE_X, new Dali.Property.Value( value ) );
394 GetProperty( Actor.Property.SCALE_Y).Get( ref temp );
399 SetProperty( Actor.Property.SCALE_Y, new Dali.Property.Value( value ) );
407 GetProperty( Actor.Property.SCALE_Z).Get( ref temp );
412 SetProperty( Actor.Property.SCALE_Z, new Dali.Property.Value( value ) );
415 public Dali.CSharp.Position WorldScale
419 Vector3 temp = new Vector3(0.0f,0.0f,0.0f);
420 GetProperty( Actor.Property.WORLD_SCALE).Get( temp );
421 Dali.CSharp.Position ret = new Dali.CSharp.Position(temp.x, temp.y, temp.z);
424 } public bool Visible
429 GetProperty( Actor.Property.VISIBLE).Get( ref temp );
434 SetProperty( Actor.Property.VISIBLE, new Dali.Property.Value( value ) );
437 public Dali.CSharp.Color Color
441 Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
442 GetProperty( Actor.Property.COLOR).Get( temp );
443 Dali.CSharp.Color ret = new Dali.CSharp.Color(temp.x, temp.y, temp.z, temp.w);
448 SetProperty( Actor.Property.COLOR, new Dali.Property.Value( value ) );
451 public float ColorRed
456 GetProperty( Actor.Property.COLOR_RED).Get( ref temp );
461 SetProperty( Actor.Property.COLOR_RED, new Dali.Property.Value( value ) );
464 public float ColorGreen
469 GetProperty( Actor.Property.COLOR_GREEN).Get( ref temp );
474 SetProperty( Actor.Property.COLOR_GREEN, new Dali.Property.Value( value ) );
477 public float ColorBlue
482 GetProperty( Actor.Property.COLOR_BLUE).Get( ref temp );
487 SetProperty( Actor.Property.COLOR_BLUE, new Dali.Property.Value( value ) );
490 public float ColorAlpha
495 GetProperty( Actor.Property.COLOR_ALPHA).Get( ref temp );
500 SetProperty( Actor.Property.COLOR_ALPHA, new Dali.Property.Value( value ) );
503 public Dali.CSharp.Color WorldColor
507 Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
508 GetProperty( Actor.Property.WORLD_COLOR).Get( temp );
509 Dali.CSharp.Color ret = new Dali.CSharp.Color(temp.r, temp.g, temp.b, temp.a);
512 } public Matrix WorldMatrix
516 Matrix temp = new Matrix();
517 GetProperty( Actor.Property.WORLD_MATRIX).Get( temp );
525 GetProperty( Actor.Property.NAME).Get( out temp );
530 SetProperty( Actor.Property.NAME, new Dali.Property.Value( value ) );
533 public bool Sensitive
538 GetProperty( Actor.Property.SENSITIVE).Get( ref temp );
543 SetProperty( Actor.Property.SENSITIVE, new Dali.Property.Value( value ) );
546 public bool LeaveRequired
551 GetProperty( Actor.Property.LEAVE_REQUIRED).Get( ref temp );
556 SetProperty( Actor.Property.LEAVE_REQUIRED, new Dali.Property.Value( value ) );
559 public bool InheritOrientation
564 GetProperty( Actor.Property.INHERIT_ORIENTATION).Get( ref temp );
569 SetProperty( Actor.Property.INHERIT_ORIENTATION, new Dali.Property.Value( value ) );
572 public bool InheritScale
577 GetProperty( Actor.Property.INHERIT_SCALE).Get( ref temp );
582 SetProperty( Actor.Property.INHERIT_SCALE, new Dali.Property.Value( value ) );
585 public string ColorMode
590 GetProperty( Actor.Property.COLOR_MODE).Get( out temp );
595 SetProperty( Actor.Property.COLOR_MODE, new Dali.Property.Value( value ) );
598 public string PositionInheritance
603 GetProperty( Actor.Property.POSITION_INHERITANCE).Get( out temp );
608 SetProperty( Actor.Property.POSITION_INHERITANCE, new Dali.Property.Value( value ) );
611 public string DrawMode
616 GetProperty( Actor.Property.DRAW_MODE).Get( out temp );
621 SetProperty( Actor.Property.DRAW_MODE, new Dali.Property.Value( value ) );
624 public Dali.CSharp.Position SizeModeFactor
628 Vector3 temp = new Vector3(0.0f,0.0f,0.0f);
629 GetProperty( Actor.Property.SIZE_MODE_FACTOR).Get( temp );
630 Dali.CSharp.Position ret = new Dali.CSharp.Position(temp.x, temp.y, temp.z);
635 SetProperty( Actor.Property.SIZE_MODE_FACTOR, new Dali.Property.Value( value ) );
638 public string WidthResizePolicy
643 GetProperty( Actor.Property.WIDTH_RESIZE_POLICY).Get( out temp );
648 SetProperty( Actor.Property.WIDTH_RESIZE_POLICY, new Dali.Property.Value( value ) );
651 public string HeightResizePolicy
656 GetProperty( Actor.Property.HEIGHT_RESIZE_POLICY).Get( out temp );
661 SetProperty( Actor.Property.HEIGHT_RESIZE_POLICY, new Dali.Property.Value( value ) );
664 public string SizeScalePolicy
669 GetProperty( Actor.Property.SIZE_SCALE_POLICY).Get( out temp );
674 SetProperty( Actor.Property.SIZE_SCALE_POLICY, new Dali.Property.Value( value ) );
677 public bool WidthForHeight
682 GetProperty( Actor.Property.WIDTH_FOR_HEIGHT).Get( ref temp );
687 SetProperty( Actor.Property.WIDTH_FOR_HEIGHT, new Dali.Property.Value( value ) );
690 public bool HeightForWidth
695 GetProperty( Actor.Property.HEIGHT_FOR_WIDTH).Get( ref temp );
700 SetProperty( Actor.Property.HEIGHT_FOR_WIDTH, new Dali.Property.Value( value ) );
703 public Vector4 Padding
707 Vector4 temp = new Vector4(0.0f,0.0f,0.0f,0.0f);
708 GetProperty( Actor.Property.PADDING).Get( temp );
713 SetProperty( Actor.Property.PADDING, new Dali.Property.Value( value ) );
716 public Dali.CSharp.Size MinimumSize
720 Vector2 temp = new Vector2(0.0f,0.0f);
721 GetProperty( Actor.Property.MINIMUM_SIZE).Get( temp );
722 Dali.CSharp.Size ret = new Dali.CSharp.Size(temp.x, temp.y);
727 SetProperty( Actor.Property.MINIMUM_SIZE, new Dali.Property.Value( value ) );
730 public Dali.CSharp.Size MaximumSize
734 Vector2 temp = new Vector2(0.0f,0.0f);
735 GetProperty( Actor.Property.MAXIMUM_SIZE).Get( temp );
736 Dali.CSharp.Size ret = new Dali.CSharp.Size(temp.x, temp.y);
741 SetProperty( Actor.Property.MAXIMUM_SIZE, new Dali.Property.Value( value ) );
744 public bool InheritPosition
749 GetProperty( Actor.Property.INHERIT_POSITION).Get( ref temp );
754 SetProperty( Actor.Property.INHERIT_POSITION, new Dali.Property.Value( value ) );
757 public string ClippingMode
762 GetProperty( Actor.Property.CLIPPING_MODE).Get( out temp );
767 SetProperty( Actor.Property.CLIPPING_MODE, new Dali.Property.Value( value ) );
770 public bool BatchParent
775 GetProperty( Actor.Property.BATCH_PARENT).Get( ref temp );
780 SetProperty( Actor.Property.BATCH_PARENT, new Dali.Property.Value( value ) );
784 /* Properties ends */
790 %define DALI_ACTOR_EVENTHANDLER_PARAM( NameSpace, ClassName)
792 ACTOR_EVENTHANDLER_TYPEMAP_EVENTARG( NameSpace, ClassName);
793 ACTOR_EVENTHANDLER_TYPEMAP_HELPER( NameSpace, ClassName);
797 %define DALI_CONST_VECTOR4_REF_TO_COLOR_CONVERSION
798 %typemap(cstype) (const Vector4& color) "Dali.CSharp.Color"
800 pre=" Vector4 temp$csinput = new Vector4($csinput.R, $csinput.G, $csinput.B, $csinput.A);",
802 ) (const Vector4& color) "$csclassname.getCPtr(temp$csinput)"
806 %define DALI_VECTOR2_TO_SIZE_CONVERSION
807 %typemap(cstype) (const Vector2& position) "Dali.CSharp.Size"
809 pre=" Vector2 temp$csinput = new Vector2($csinput.W, $csinput.H);",
811 ) (const Vector2& position) "$csclassname.getCPtr(temp$csinput)"
817 DALI_ACTOR_EVENTHANDLER_PARAM( Dali, Actor);
818 DALI_CONST_VECTOR4_REF_TO_COLOR_CONVERSION;
819 DALI_VECTOR2_TO_SIZE_CONVERSION;