Remove internal & unused Adaptor functions from binder and NUI
[platform/core/uifw/dali-csharp-binder.git] / dali-csharp-binder / src / adaptor.cpp
1 /*
2  * Copyright (c) 2020 Samsung Electronics Co., Ltd.
3  *
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
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
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.
15  *
16  */
17
18 #ifndef CSHARP_ADAPTOR
19 #define CSHARP_ADAPTOR
20 #endif
21
22 #include "common.h"
23 #include <dali/integration-api/adaptor-framework/adaptor.h>
24 // #include <dali/public-api/adaptor-framework/application-configuration.h>
25
26
27 SWIGINTERN bool Dali_Signal_Sl_void_Sp_Dali_Adaptor_SA__SP__Sg__Empty(Dali::Signal< void (Dali::Adaptor &) > const *self){
28     return self->Empty();
29 }
30 SWIGINTERN std::size_t Dali_Signal_Sl_void_Sp_Dali_Adaptor_SA__SP__Sg__GetConnectionCount(Dali::Signal< void (Dali::Adaptor &) > const *self){
31   return self->GetConnectionCount();
32 }
33 SWIGINTERN void Dali_Signal_Sl_void_Sp_Dali_Adaptor_SA__SP__Sg__Connect(Dali::Signal< void (Dali::Adaptor &) > *self,void (*func)(Dali::Adaptor &)){
34     self->Connect( func );
35 }
36 SWIGINTERN void Dali_Signal_Sl_void_Sp_Dali_Adaptor_SA__SP__Sg__Disconnect(Dali::Signal< void (Dali::Adaptor &) > *self,void (*func)(Dali::Adaptor &)){
37     self->Disconnect( func );
38 }
39 SWIGINTERN void Dali_Signal_Sl_void_Sp_Dali_Adaptor_SA__SP__Sg__Emit(Dali::Signal< void (Dali::Adaptor &) > *self,Dali::Adaptor &arg){
40     self->Emit( arg );
41 }
42
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
46
47
48 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_Adaptor(void * jarg1) {
49   Dali::Adaptor *arg1 = (Dali::Adaptor *) 0 ;
50
51   arg1 = (Dali::Adaptor *)jarg1;
52   {
53     try {
54       delete arg1;
55     } catch (std::out_of_range& e) {
56       {
57         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
58       };
59     } catch (std::exception& e) {
60       {
61         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
62       };
63     } catch (Dali::DaliException e) {
64       {
65         SWIG_CSharpException(SWIG_UnknownError, e.condition); return ;
66       };
67     } catch (...) {
68       {
69         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
70       };
71     }
72   }
73
74 }
75
76
77 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Adaptor_SetRenderRefreshRate(void * jarg1, unsigned int jarg2) {
78   Dali::Adaptor *arg1 = (Dali::Adaptor *) 0 ;
79   unsigned int arg2 ;
80
81   arg1 = (Dali::Adaptor *)jarg1;
82   arg2 = (unsigned int)jarg2;
83   {
84     try {
85       (arg1)->SetRenderRefreshRate(arg2);
86     } catch (std::out_of_range& e) {
87       {
88         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
89       };
90     } catch (std::exception& e) {
91       {
92         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
93       };
94     } catch (Dali::DaliException e) {
95       {
96         SWIG_CSharpException(SWIG_UnknownError, e.condition); return ;
97       };
98     } catch (...) {
99       {
100         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
101       };
102     }
103   }
104
105 }
106
107
108 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_Adaptor_Get() {
109   void * jresult ;
110   Dali::Adaptor *result = 0 ;
111
112   {
113     try {
114       result = (Dali::Adaptor *) &Dali::Adaptor::Get();
115     } catch (std::out_of_range& e) {
116       {
117         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
118       };
119     } catch (std::exception& e) {
120       {
121         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
122       };
123     } catch (Dali::DaliException e) {
124       {
125         SWIG_CSharpException(SWIG_UnknownError, e.condition); return 0;
126       };
127     } catch (...) {
128       {
129         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
130       };
131     }
132   }
133
134   jresult = (void *)result;
135   return jresult;
136 }
137
138
139 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Adaptor_FeedWheelEvent(void * jarg1, void * jarg2) {
140   Dali::Adaptor *arg1 = (Dali::Adaptor *) 0 ;
141   Dali::WheelEvent *arg2 = 0 ;
142
143   arg1 = (Dali::Adaptor *)jarg1;
144   arg2 = (Dali::WheelEvent *)jarg2;
145   if (!arg2) {
146     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::WheelEvent & type is null", 0);
147     return ;
148   }
149   {
150     try {
151       (arg1)->FeedWheelEvent(*arg2);
152     } catch (std::out_of_range& e) {
153       {
154         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
155       };
156     } catch (std::exception& e) {
157       {
158         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
159       };
160     } catch (Dali::DaliException e) {
161       {
162         SWIG_CSharpException(SWIG_UnknownError, e.condition); return ;
163       };
164     } catch (...) {
165       {
166         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
167       };
168     }
169   }
170
171 }
172
173
174 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_Adaptor_FeedKeyEvent(void * jarg1, void * jarg2) {
175   Dali::Adaptor *arg1 = (Dali::Adaptor *) 0 ;
176   Dali::KeyEvent *arg2 = 0 ;
177
178   arg1 = (Dali::Adaptor *)jarg1;
179   arg2 = (Dali::KeyEvent *)jarg2;
180   if (!arg2) {
181     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::KeyEvent & type is null", 0);
182     return ;
183   }
184   {
185     try {
186       (arg1)->FeedKeyEvent(*arg2);
187     } catch (std::out_of_range& e) {
188       {
189         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
190       };
191     } catch (std::exception& e) {
192       {
193         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
194       };
195     } catch (Dali::DaliException e) {
196       {
197         SWIG_CSharpException(SWIG_UnknownError, e.condition); return ;
198       };
199     } catch (...) {
200       {
201         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
202       };
203     }
204   }
205
206 }
207
208
209 #ifdef __cplusplus
210 }
211 #endif