add Convert from TouchEvent to TouchData
[platform/core/uifw/dali-csharp-binder.git] / dali-csharp-binder / src / layout-measured-size.cpp
1 /*
2  * Copyright (c) 2018 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 #include "common.h"
19 #include <dali-toolkit/devel-api/layouting/measured-size.h>
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_MeasuredSize__SWIG_0()
26 {
27   void * jresult ;
28   Dali::Toolkit::MeasuredSize *result = 0 ;
29
30   try
31   {
32     result = (Dali::Toolkit::MeasuredSize *)new Dali::Toolkit::MeasuredSize();
33   }
34   catch (std::out_of_range& e)
35   {
36     SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
37   }
38   catch (std::exception& e)
39   {
40     SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
41   }
42   catch (...)
43   {
44     SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
45   }
46   jresult = (void *)result;
47   return jresult;
48 }
49
50
51 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_MeasuredSize__SWIG_1(void * jarg1)
52 {
53   void * jresult ;
54   SwigValueWrapper< Dali::Toolkit::LayoutLength > arg1 ;
55   Dali::Toolkit::LayoutLength *argp1 ;
56   Dali::Toolkit::MeasuredSize *result = 0 ;
57
58   argp1 = (Dali::Toolkit::LayoutLength *)jarg1;
59   if (!argp1)
60   {
61     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Toolkit::LayoutLength", 0);
62     return 0;
63   }
64   arg1 = *argp1;
65   try
66   {
67     result = (Dali::Toolkit::MeasuredSize *)new Dali::Toolkit::MeasuredSize(arg1);
68   }
69   catch (std::out_of_range& e)
70   {
71     SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
72   }
73   catch (std::exception& e)
74   {
75     SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
76   }
77   catch (...)
78   {
79     SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
80   }
81   jresult = (void *)result;
82   return jresult;
83 }
84
85
86 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_MeasuredSize__SWIG_2(void * jarg1, int jarg2)
87 {
88   void * jresult ;
89   SwigValueWrapper< Dali::Toolkit::LayoutLength > arg1 ;
90   Dali::Toolkit::MeasuredSize::State arg2 ;
91   Dali::Toolkit::LayoutLength *argp1 ;
92   Dali::Toolkit::MeasuredSize *result = 0 ;
93
94   argp1 = (Dali::Toolkit::LayoutLength *)jarg1;
95   if (!argp1)
96   {
97     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Toolkit::LayoutLength", 0);
98     return 0;
99   }
100   arg1 = *argp1;
101   arg2 = (Dali::Toolkit::MeasuredSize::State)jarg2;
102   try
103   {
104     result = (Dali::Toolkit::MeasuredSize *)new Dali::Toolkit::MeasuredSize(arg1,arg2);
105   }
106   catch (std::out_of_range& e)
107   {
108     SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
109   }
110   catch (std::exception& e)
111   {
112     SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
113   }
114   catch (...)
115   {
116     SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
117   }
118
119   jresult = (void *)result;
120   return jresult;
121 }
122
123
124 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_MeasuredSize(void * jarg1)
125 {
126   Dali::Toolkit::MeasuredSize *arg1 = (Dali::Toolkit::MeasuredSize *) 0 ;
127
128   arg1 = (Dali::Toolkit::MeasuredSize *)jarg1;
129   try
130   {
131     delete arg1;
132   }
133   catch (std::out_of_range& e)
134   {
135     SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
136   }
137   catch (std::exception& e)
138   {
139     SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
140   }
141   catch (...)
142   {
143     SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
144   }
145 }
146
147
148 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_MeasuredSize_Assign__SWIG_0(void * jarg1, void * jarg2)
149 {
150   void * jresult ;
151   Dali::Toolkit::MeasuredSize *arg1 = (Dali::Toolkit::MeasuredSize *) 0 ;
152   Dali::Toolkit::MeasuredSize *arg2 = 0 ;
153   Dali::Toolkit::MeasuredSize *result = 0 ;
154
155   arg1 = (Dali::Toolkit::MeasuredSize *)jarg1;
156   arg2 = (Dali::Toolkit::MeasuredSize *)jarg2;
157   if (!arg2)
158   {
159     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Toolkit::MeasuredSize const & type is null", 0);
160     return 0;
161   }
162   try
163   {
164     result = (Dali::Toolkit::MeasuredSize *) &(arg1)->operator =((Dali::Toolkit::MeasuredSize const &)*arg2);
165   }
166   catch (std::out_of_range& e)
167   {
168     SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
169   }
170   catch (std::exception& e)
171   {
172     SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
173   }
174   catch (...)
175   {
176     SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
177   }
178   jresult = (void *)result;
179   return jresult;
180 }
181
182
183 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_MeasuredSize_Assign__SWIG_1(void * jarg1, int jarg2)
184 {
185   void * jresult ;
186   Dali::Toolkit::MeasuredSize *arg1 = (Dali::Toolkit::MeasuredSize *) 0 ;
187   Dali::Toolkit::MeasuredSize *result = 0 ;
188
189   arg1 = (Dali::Toolkit::MeasuredSize *)jarg1;
190
191   try
192   {
193     result = (Dali::Toolkit::MeasuredSize *) &(arg1)->operator =(jarg2);
194   }
195   catch (std::out_of_range& e)
196   {
197     SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
198   }
199   catch (std::exception& e)
200   {
201     SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
202   }
203   catch (...)
204   {
205     SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
206   }
207
208   jresult = (void *)result;
209   return jresult;
210 }
211
212
213 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_MeasuredSize_EqualTo(void * jarg1, void * jarg2)
214 {
215   unsigned int jresult ;
216   Dali::Toolkit::MeasuredSize *arg1 = (Dali::Toolkit::MeasuredSize *) 0 ;
217   Dali::Toolkit::MeasuredSize arg2 ;
218   Dali::Toolkit::MeasuredSize *argp2 ;
219   bool result;
220
221   arg1 = (Dali::Toolkit::MeasuredSize *)jarg1;
222   argp2 = (Dali::Toolkit::MeasuredSize *)jarg2;
223   if (!argp2)
224   {
225     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Toolkit::MeasuredSize", 0);
226     return 0;
227   }
228   arg2 = *argp2;
229   try
230   {
231     result = (bool)(arg1)->operator ==(arg2);
232   }
233   catch (std::out_of_range& e)
234   {
235     SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
236   }
237   catch (std::exception& e)
238   {
239     SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
240   }
241   catch (...)
242   {
243     SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
244   }
245   jresult = result;
246   return jresult;
247 }
248
249
250 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_MeasuredSize_NotEqualTo(void * jarg1, void * jarg2)
251 {
252   unsigned int jresult ;
253   Dali::Toolkit::MeasuredSize *arg1 = (Dali::Toolkit::MeasuredSize *) 0 ;
254   Dali::Toolkit::MeasuredSize arg2 ;
255   Dali::Toolkit::MeasuredSize *argp2 ;
256   bool result;
257
258   arg1 = (Dali::Toolkit::MeasuredSize *)jarg1;
259   argp2 = (Dali::Toolkit::MeasuredSize *)jarg2;
260   if (!argp2)
261   {
262     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Toolkit::MeasuredSize", 0);
263     return 0;
264   }
265   arg2 = *argp2;
266   try
267   {
268     result = (bool)(arg1)->operator !=(arg2);
269   }
270   catch (std::out_of_range& e)
271   {
272     SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
273   }
274   catch (std::exception& e)
275   {
276     SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
277   }
278   catch (...)
279   {
280     SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
281   }
282   jresult = result;
283   return jresult;
284 }
285
286
287 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_MeasuredSize_SetState(void * jarg1, int jarg2)
288 {
289   Dali::Toolkit::MeasuredSize *arg1 = (Dali::Toolkit::MeasuredSize *) 0 ;
290   Dali::Toolkit::MeasuredSize::State arg2 ;
291
292   arg1 = (Dali::Toolkit::MeasuredSize *)jarg1;
293   arg2 = (Dali::Toolkit::MeasuredSize::State)jarg2;
294   try
295   {
296     (arg1)->SetState(arg2);
297   }
298   catch (std::out_of_range& e)
299   {
300     SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
301   }
302   catch (std::exception& e)
303   {
304     SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
305   }
306   catch (...)
307   {
308     SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
309   }
310 }
311
312
313 SWIGEXPORT int SWIGSTDCALL CSharp_Dali_MeasuredSize_GetState(void * jarg1)
314 {
315   int jresult ;
316   Dali::Toolkit::MeasuredSize *arg1 = (Dali::Toolkit::MeasuredSize *) 0 ;
317   Dali::Toolkit::MeasuredSize::State result;
318
319   arg1 = (Dali::Toolkit::MeasuredSize *)jarg1;
320   try
321   {
322     result = (Dali::Toolkit::MeasuredSize::State)(arg1)->GetState();
323   }
324   catch (std::out_of_range& e)
325   {
326     SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
327   }
328   catch (std::exception& e)
329   {
330     SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
331   }
332   catch (...)
333   {
334     SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
335   }
336   jresult = (int)result;
337   return jresult;
338 }
339
340
341 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_MeasuredSize_SetSize(void * jarg1, void * jarg2)
342 {
343   Dali::Toolkit::MeasuredSize *arg1 = (Dali::Toolkit::MeasuredSize *) 0 ;
344   SwigValueWrapper< Dali::Toolkit::LayoutLength > arg2 ;
345   Dali::Toolkit::LayoutLength *argp2 ;
346
347   arg1 = (Dali::Toolkit::MeasuredSize *)jarg1;
348   argp2 = (Dali::Toolkit::LayoutLength *)jarg2;
349   if (!argp2)
350   {
351     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Toolkit::LayoutLength", 0);
352     return ;
353   }
354   arg2 = *argp2;
355   try
356   {
357     (arg1)->SetSize(arg2);
358   }
359   catch (std::out_of_range& e)
360   {
361     SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
362   }
363   catch (std::exception& e)
364   {
365     SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
366   }
367   catch (...)
368   {
369     SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
370   }
371 }
372
373
374 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_MeasuredSize_GetSize(void * jarg1)
375 {
376   void * jresult ;
377   Dali::Toolkit::MeasuredSize *arg1 = (Dali::Toolkit::MeasuredSize *) 0 ;
378   SwigValueWrapper< Dali::Toolkit::LayoutLength > result;
379
380   arg1 = (Dali::Toolkit::MeasuredSize *)jarg1;
381   try
382   {
383     result = (arg1)->GetSize();
384   }
385   catch (std::out_of_range& e)
386   {
387     SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
388   }
389   catch (std::exception& e)
390   {
391     SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
392   }
393   catch (...)
394   {
395     SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
396   }
397   jresult = new Dali::Toolkit::LayoutLength((const Dali::Toolkit::LayoutLength &)result);
398   return jresult;
399 }
400
401 #ifdef __cplusplus
402 }
403 #endif
404