Bindings for Layouting.
[platform/core/uifw/dali-csharp-binder.git] / dali-csharp-binder / src / layout-group-wrapper.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/layout-group.h>
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_LayoutGroupWrapper_UNKNOWN_ID_get() {
26   unsigned int jresult ;
27   unsigned int result;
28
29   result = (unsigned int)Dali::Toolkit::LayoutGroup::UNKNOWN_ID;
30   jresult = result;
31   return jresult;
32 }
33
34
35 SWIGEXPORT int SWIGSTDCALL CSharp_Dali_LayoutGroupWrapper_ChildProperty_MARGIN_SPECIFICATION_get() {
36   int jresult ;
37   int result;
38
39   result = (int)Dali::Toolkit::LayoutGroup::ChildProperty::MARGIN_SPECIFICATION;
40   jresult = (int)result;
41   return jresult;
42 }
43
44
45 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_LayoutGroupWrapper_ChildProperty() {
46   void * jresult ;
47   Dali::Toolkit::LayoutGroup::ChildProperty *result = 0 ;
48
49   {
50     try {
51       result = (Dali::Toolkit::LayoutGroup::ChildProperty *)new Dali::Toolkit::LayoutGroup::ChildProperty();
52     } catch (std::out_of_range& e) {
53       {
54         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
55       };
56     } catch (std::exception& e) {
57       {
58         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
59       };
60     } catch (...) {
61       {
62         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
63       };
64     }
65   }
66   jresult = (void *)result;
67   return jresult;
68 }
69
70
71 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_LayoutGroupWrapper_ChildProperty(void * jarg1) {
72   Dali::Toolkit::LayoutGroup::ChildProperty *arg1 = (Dali::Toolkit::LayoutGroup::ChildProperty *) 0 ;
73
74   arg1 = (Dali::Toolkit::LayoutGroup::ChildProperty *)jarg1;
75   {
76     try {
77       delete arg1;
78     } catch (std::out_of_range& e) {
79       {
80         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
81       };
82     } catch (std::exception& e) {
83       {
84         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
85       };
86     } catch (...) {
87       {
88         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
89       };
90     }
91   }
92 }
93
94
95 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_LayoutGroupWrapper__SWIG_0() {
96   void * jresult ;
97   Dali::Toolkit::LayoutGroup *result = 0 ;
98
99   {
100     try {
101       result = (Dali::Toolkit::LayoutGroup *)new Dali::Toolkit::LayoutGroup();
102     } catch (std::out_of_range& e) {
103       {
104         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
105       };
106     } catch (std::exception& e) {
107       {
108         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
109       };
110     } catch (...) {
111       {
112         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
113       };
114     }
115   }
116   jresult = (void *)result;
117   return jresult;
118 }
119
120
121 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_LayoutGroupWrapper(void * jarg1) {
122   Dali::Toolkit::LayoutGroup *arg1 = (Dali::Toolkit::LayoutGroup *) 0 ;
123
124   arg1 = (Dali::Toolkit::LayoutGroup *)jarg1;
125   {
126     try {
127       delete arg1;
128     } catch (std::out_of_range& e) {
129       {
130         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
131       };
132     } catch (std::exception& e) {
133       {
134         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
135       };
136     } catch (...) {
137       {
138         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
139       };
140     }
141   }
142 }
143
144
145 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_LayoutGroupWrapper__SWIG_1(void * jarg1) {
146   void * jresult ;
147   Dali::Toolkit::LayoutGroup *arg1 = 0 ;
148   Dali::Toolkit::LayoutGroup *result = 0 ;
149
150   arg1 = (Dali::Toolkit::LayoutGroup *)jarg1;
151   if (!arg1) {
152     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Toolkit::LayoutGroup const & type is null", 0);
153     return 0;
154   }
155   {
156     try {
157       result = (Dali::Toolkit::LayoutGroup *)new Dali::Toolkit::LayoutGroup((Dali::Toolkit::LayoutGroup const &)*arg1);
158     } catch (std::out_of_range& e) {
159       {
160         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
161       };
162     } catch (std::exception& e) {
163       {
164         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
165       };
166     } catch (...) {
167       {
168         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
169       };
170     }
171   }
172   jresult = (void *)result;
173   return jresult;
174 }
175
176
177 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_LayoutGroupWrapper_Assign(void * jarg1, void * jarg2) {
178   void * jresult ;
179   Dali::Toolkit::LayoutGroup *arg1 = (Dali::Toolkit::LayoutGroup *) 0 ;
180   Dali::Toolkit::LayoutGroup *arg2 = 0 ;
181   Dali::Toolkit::LayoutGroup *result = 0 ;
182
183   arg1 = (Dali::Toolkit::LayoutGroup *)jarg1;
184   arg2 = (Dali::Toolkit::LayoutGroup *)jarg2;
185   if (!arg2) {
186     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Toolkit::LayoutGroup const & type is null", 0);
187     return 0;
188   }
189   {
190     try {
191       result = (Dali::Toolkit::LayoutGroup *) &(arg1)->operator =((Dali::Toolkit::LayoutGroup const &)*arg2);
192     } catch (std::out_of_range& e) {
193       {
194         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
195       };
196     } catch (std::exception& e) {
197       {
198         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
199       };
200     } catch (...) {
201       {
202         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
203       };
204     }
205   }
206   jresult = (void *)result;
207   return jresult;
208 }
209
210
211 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_LayoutGroupWrapper_DownCast(void * jarg1) {
212   void * jresult ;
213   Dali::BaseHandle arg1 ;
214   Dali::BaseHandle *argp1 ;
215   Dali::Toolkit::LayoutGroup result;
216
217   argp1 = (Dali::BaseHandle *)jarg1;
218   if (!argp1) {
219     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::BaseHandle", 0);
220     return 0;
221   }
222   arg1 = *argp1;
223   {
224     try {
225       result = Dali::Toolkit::LayoutGroup::DownCast(arg1);
226     } catch (std::out_of_range& e) {
227       {
228         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
229       };
230     } catch (std::exception& e) {
231       {
232         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
233       };
234     } catch (...) {
235       {
236         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
237       };
238     }
239   }
240   jresult = new Dali::Toolkit::LayoutGroup((const Dali::Toolkit::LayoutGroup &)result);
241   return jresult;
242 }
243
244
245 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_LayoutGroupWrapper_Add(void * jarg1, void * jarg2) {
246   unsigned int jresult ;
247   Dali::Toolkit::LayoutGroup *arg1 = (Dali::Toolkit::LayoutGroup *) 0 ;
248   Dali::Toolkit::LayoutItem *arg2 = 0 ;
249   Dali::Toolkit::LayoutGroup::LayoutId result;
250
251   arg1 = (Dali::Toolkit::LayoutGroup *)jarg1;
252   arg2 = (Dali::Toolkit::LayoutItem *)jarg2;
253   if (!arg2) {
254     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Toolkit::LayoutItem & type is null", 0);
255     return 0;
256   }
257   {
258     try {
259       result = (Dali::Toolkit::LayoutGroup::LayoutId)(arg1)->Add(*arg2);
260     } catch (std::out_of_range& e) {
261       {
262         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
263       };
264     } catch (std::exception& e) {
265       {
266         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
267       };
268     } catch (...) {
269       {
270         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
271       };
272     }
273   }
274   jresult = result;
275   return jresult;
276 }
277
278
279 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_LayoutGroupWrapper_Remove__SWIG_0(void * jarg1, unsigned int jarg2) {
280   Dali::Toolkit::LayoutGroup *arg1 = (Dali::Toolkit::LayoutGroup *) 0 ;
281   Dali::Toolkit::LayoutGroup::LayoutId arg2 ;
282
283   arg1 = (Dali::Toolkit::LayoutGroup *)jarg1;
284   arg2 = (Dali::Toolkit::LayoutGroup::LayoutId)jarg2;
285   {
286     try {
287       (arg1)->Remove(arg2);
288     } catch (std::out_of_range& e) {
289       {
290         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
291       };
292     } catch (std::exception& e) {
293       {
294         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
295       };
296     } catch (...) {
297       {
298         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
299       };
300     }
301   }
302 }
303
304
305 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_LayoutGroupWrapper_Remove__SWIG_1(void * jarg1, void * jarg2) {
306   Dali::Toolkit::LayoutGroup *arg1 = (Dali::Toolkit::LayoutGroup *) 0 ;
307   Dali::Toolkit::LayoutItem *arg2 = 0 ;
308
309   arg1 = (Dali::Toolkit::LayoutGroup *)jarg1;
310   arg2 = (Dali::Toolkit::LayoutItem *)jarg2;
311   if (!arg2) {
312     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Toolkit::LayoutItem & type is null", 0);
313     return ;
314   }
315   {
316     try {
317       (arg1)->Remove(*arg2);
318     } catch (std::out_of_range& e) {
319       {
320         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
321       };
322     } catch (std::exception& e) {
323       {
324         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
325       };
326     } catch (...) {
327       {
328         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
329       };
330     }
331   }
332 }
333
334
335 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_LayoutGroupWrapper_GetChildAt(void * jarg1, unsigned int jarg2) {
336   void * jresult ;
337   Dali::Toolkit::LayoutGroup *arg1 = (Dali::Toolkit::LayoutGroup *) 0 ;
338   unsigned int arg2 ;
339   Dali::Toolkit::LayoutItem result;
340
341   arg1 = (Dali::Toolkit::LayoutGroup *)jarg1;
342   arg2 = (unsigned int)jarg2;
343   {
344     try {
345       result = ((Dali::Toolkit::LayoutGroup const *)arg1)->GetChildAt(arg2);
346     } catch (std::out_of_range& e) {
347       {
348         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
349       };
350     } catch (std::exception& e) {
351       {
352         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
353       };
354     } catch (...) {
355       {
356         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
357       };
358     }
359   }
360   jresult = new Dali::Toolkit::LayoutItem((const Dali::Toolkit::LayoutItem &)result);
361   return jresult;
362 }
363
364
365 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_LayoutGroupWrapper_GetChildCount(void * jarg1) {
366   unsigned int jresult ;
367   Dali::Toolkit::LayoutGroup *arg1 = (Dali::Toolkit::LayoutGroup *) 0 ;
368   unsigned int result;
369
370   arg1 = (Dali::Toolkit::LayoutGroup *)jarg1;
371   {
372     try {
373       result = (unsigned int)((Dali::Toolkit::LayoutGroup const *)arg1)->GetChildCount();
374     } catch (std::out_of_range& e) {
375       {
376         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
377       };
378     } catch (std::exception& e) {
379       {
380         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
381       };
382     } catch (...) {
383       {
384         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
385       };
386     }
387   }
388   jresult = result;
389   return jresult;
390 }
391
392
393 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_LayoutGroupWrapper_GetChild(void * jarg1, unsigned int jarg2) {
394   void * jresult ;
395   Dali::Toolkit::LayoutGroup *arg1 = (Dali::Toolkit::LayoutGroup *) 0 ;
396   Dali::Toolkit::LayoutGroup::LayoutId arg2 ;
397   Dali::Toolkit::LayoutItem result;
398
399   arg1 = (Dali::Toolkit::LayoutGroup *)jarg1;
400   arg2 = (Dali::Toolkit::LayoutGroup::LayoutId)jarg2;
401   {
402     try {
403       result = ((Dali::Toolkit::LayoutGroup const *)arg1)->GetChild(arg2);
404     } catch (std::out_of_range& e) {
405       {
406         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
407       };
408     } catch (std::exception& e) {
409       {
410         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
411       };
412     } catch (...) {
413       {
414         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
415       };
416     }
417   }
418   jresult = new Dali::Toolkit::LayoutItem((const Dali::Toolkit::LayoutItem &)result);
419   return jresult;
420 }
421
422
423 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_LayoutGroupWrapper__SWIG_2(void * jarg1) {
424   void * jresult ;
425   Dali::Toolkit::Internal::LayoutGroup *arg1 = (Dali::Toolkit::Internal::LayoutGroup *) 0 ;
426   Dali::Toolkit::LayoutGroup *result = 0 ;
427
428   arg1 = (Dali::Toolkit::Internal::LayoutGroup *)jarg1;
429   {
430     try {
431       result = (Dali::Toolkit::LayoutGroup *)new Dali::Toolkit::LayoutGroup(arg1);
432     } catch (std::out_of_range& e) {
433       {
434         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
435       };
436     } catch (std::exception& e) {
437       {
438         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
439       };
440     } catch (...) {
441       {
442         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
443       };
444     }
445   }
446   jresult = (void *)result;
447   return jresult;
448 }
449
450 SWIGEXPORT Dali::Toolkit::LayoutItem * SWIGSTDCALL CSharp_Dali_LayoutGroupWrapper_SWIGUpcast(Dali::Toolkit::LayoutGroup *jarg1) {
451     return (Dali::Toolkit::LayoutItem *)jarg1;
452 }
453
454 #ifdef __cplusplus
455 }
456 #endif
457