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.
19 * WARNING: The macro below may be over-ridden by any other typemap(cscode)
20 * customisation for a class.
22 * MACRO to inject a C# function in to a SWIG generated DALi C# wrapper class.
23 * The MACRO allow you to create a C# wrapper class for a DALi C++ object (passed as a C PTR).
25 * Required to get access to any data passed as a parameter in a Signal ( in C# they are delegate parameters).
28 * CREATE_CSHARP_WRAPPER_FROM_C_PTR_FUNCTION( Touch );
29 * Creates a function called GetTouchFromPtr which allows you to:
31 * static void OnStageTouched(IntPtr data)
33 * Touch touch = Touch.GetTouchFromPtr( data );
36 * ## means concat in a SWIG macro
39 %define DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( NameSpace, ClassName )
41 %typemap(cscode) NameSpace::ClassName %{
42 public static ClassName Get ## ClassName ## FromPtr(global::System.IntPtr cPtr) {
43 ClassName ret = new ClassName(cPtr, false);
44 if (NDalicPINVOKE.SWIGPendingException.Pending) throw NDalicPINVOKE.SWIGPendingException.Retrieve();
51 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, Application );
53 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, Actor );
54 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, Image );
55 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, ResourceImage );
56 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, Animation );
57 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, PropertyNotification );
58 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, BaseHandle );
59 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, RefObject );
60 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, RenderTask );
61 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, Vector2 );
63 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, AccessibilityManager );
64 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali, StyleManager );
65 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali::Toolkit, Control );
66 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali::Toolkit, Button );
67 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali::Toolkit, GaussianBlurView );
68 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali::Toolkit, PageTurnView );
69 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali::Toolkit, TextEditor );
70 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali::Toolkit, TextField );
72 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali::Toolkit, TextField );
73 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali::Toolkit, VideoView );
74 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali::Toolkit, Slider );
75 DALI_CREATE_C_PTR_TO_CSHARP_FUNCTION( Dali::Toolkit::ScrollView, SnapEvent );