2 * Copyright (c) 2020 Samsung Electronics Co., Ltd.
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
18 // EXTERNAL INCLUDES
\r
19 #include <dali/dali.h>
\r
20 #include <dali/devel-api/adaptor-framework/component-application.h>
\r
22 // INTERNAL INCLUDES
\r
32 typedef void* (*CreateNativeSignalType)();
\r
33 CreateNativeSignalType callback;
\r
35 Dali::Any CreateNativeSignalCallbackWrapper()
\r
40 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_ComponentApplication(int jarg1, char * jarg2, char * jarg3) {
\r
42 int *arg1 = (int *) 0 ;
\r
44 std::string *arg3 = 0 ;
\r
45 Dali::ComponentApplication result;
\r
52 argV = new char*[jarg1 + 1];
\r
54 retPtr = strtok_r( jarg2, " ", &nextPtr);
\r
57 length = strlen(retPtr);
\r
59 argV[index] = new char[length + 1];
\r
62 strncpy(argV[index], retPtr, length);
\r
64 argV[index][length] = '\0';
\r
67 while (index < jarg1)
\r
70 retPtr = strtok_r(NULL, " ", &nextPtr);
\r
73 length = strlen(retPtr);
\r
75 argV[index] = new char[length + 1];
\r
78 strncpy(argV[index], retPtr, length);
\r
80 argV[index][length] = '\0';
\r
92 SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
\r
95 std::string arg3_str(jarg3);
\r
99 result = Dali::ComponentApplication::New(arg1,arg2,(std::string const &)*arg3);
\r
100 } CALL_CATCH_EXCEPTION(0);
\r
102 jresult = new Dali::ComponentApplication((const Dali::ComponentApplication &)result);
\r
107 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_ComponentApplication_SWIG1(void * jarg1) {
\r
109 Dali::ComponentApplication *arg1 = 0 ;
\r
110 Dali::ComponentApplication *result = 0 ;
\r
112 arg1 = (Dali::ComponentApplication *)jarg1;
\r
114 SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::ComponentApplication const & type is null", 0);
\r
119 result = (Dali::ComponentApplication *)new Dali::ComponentApplication((Dali::ComponentApplication const &)*arg1);
\r
120 } CALL_CATCH_EXCEPTION(0);
\r
122 jresult = (void *)result;
\r
127 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_assign_ComponentApplication(void * jarg1, void * jarg2) {
\r
129 Dali::ComponentApplication *arg1 = (Dali::ComponentApplication *) 0 ;
\r
130 Dali::ComponentApplication *arg2 = 0 ;
\r
131 Dali::ComponentApplication *result = 0 ;
\r
133 arg1 = (Dali::ComponentApplication *)jarg1;
\r
134 arg2 = (Dali::ComponentApplication *)jarg2;
\r
136 SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::ComponentApplication const & type is null", 0);
\r
141 result = (Dali::ComponentApplication *) &(arg1)->operator =((Dali::ComponentApplication const &)*arg2);
\r
142 } CALL_CATCH_EXCEPTION(0);
\r
144 jresult = (void *)result;
\r
148 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_ComponentApplication(void * jarg1) {
\r
149 Dali::ComponentApplication *arg1 = (Dali::ComponentApplication *) 0 ;
\r
151 arg1 = (Dali::ComponentApplication *)jarg1;
\r
157 // free string data
\r
158 for( int i=0; i < argC+1; i++)
\r
164 } CALL_CATCH_EXCEPTION();
\r
168 SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_ComponentApplication_CreateNativeSignal(void * jarg1) {
\r
170 Dali::ComponentApplication *arg1 = (Dali::ComponentApplication *) 0 ;
\r
171 Dali::ComponentApplication::CreateSignalType *result = 0 ;
\r
173 arg1 = (Dali::ComponentApplication *)jarg1;
\r
176 result = (Dali::ComponentApplication::CreateSignalType *) &(arg1)->CreateSignal();
\r
177 } CALL_CATCH_EXCEPTION(0);
\r
180 jresult = (void*)result;
\r
184 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_ComponentApplication_CreateNativeSignal_Connect(void * jarg1, void * jarg2) {
\r
185 Dali::ComponentApplication *arg1 = (Dali::ComponentApplication *) 0 ;
\r
186 arg1 = (Dali::ComponentApplication *)jarg1;
\r
188 callback = (CreateNativeSignalType) jarg2;
\r
191 (arg1)->CreateSignal().Connect(CreateNativeSignalCallbackWrapper);
\r
192 } CALL_CATCH_EXCEPTION();
\r
196 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_ComponentApplication_CreateNativeSignal_Disconnect(void * jarg1, void * jarg2) {
\r
197 Dali::ComponentApplication *arg1 = (Dali::ComponentApplication *) 0 ;
\r
198 arg1 = (Dali::ComponentApplication *)jarg1;
\r
202 (arg1)->CreateSignal().Disconnect(CreateNativeSignalCallbackWrapper);
\r
203 } CALL_CATCH_EXCEPTION();
\r