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