e39eb0a8592fb909ee32b3668b77391e9025919c
[platform/core/uifw/dali-csharp-binder.git] / dali-csharp-binder / src / flex-layout.cpp
1 #ifndef CSHARP_FLEX_LAYOUT
2 #define CSHARP_FLEX_LAYOUT
3 #endif
4
5 #include "common.h"
6 #include <dali-toolkit/devel-api/layouting/flex-node.h>
7 #include <iostream>
8
9 #ifdef __cplusplus
10 extern "C" {
11 #endif
12
13 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_FlexLayout_New()
14 {
15   void * jresult ;
16   Dali::Toolkit::Flex::Node* result;
17
18   {
19     try {
20       result = new Dali::Toolkit::Flex::Node();
21     } catch (std::out_of_range& e) {
22       {
23         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what()));
24       };
25     } catch (std::exception& e) {
26       {
27         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what()));
28       };
29     } catch (...) {
30       {
31         SWIG_CSharpException(SWIG_UnknownError, "unknown error");
32       };
33     }
34   }
35   jresult = (void *)result;
36   return result;
37 }
38
39
40 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_FlexLayout(void * jarg1)
41 {
42   Dali::Toolkit::Flex::Node *arg1 = (Dali::Toolkit::Flex::Node *) 0 ;
43
44   arg1 = (Dali::Toolkit::Flex::Node *)jarg1;
45   {
46     try {
47       delete arg1;
48     } catch (std::out_of_range& e) {
49       {
50         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what()));
51       };
52     } catch (std::exception& e) {
53       {
54         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what()));
55       };
56     } catch (...) {
57       {
58         SWIG_CSharpException(SWIG_UnknownError, "unknown error");
59       };
60     }
61   }
62 }
63
64
65 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_FlexLayout_SetFlexDirection(void * jarg1, int jarg2)
66 {
67   Dali::Toolkit::Flex::Node *arg1 = (Dali::Toolkit::Flex::Node *) 0 ;
68   Dali::Toolkit::Flex::FlexDirection arg2 ;
69
70   arg1 = (Dali::Toolkit::Flex::Node *)jarg1;
71   arg2 = (Dali::Toolkit::Flex::FlexDirection)jarg2;
72   {
73     try {
74       arg1->Dali::Toolkit::Flex::Node::SetFlexDirection( arg2);
75     } catch (std::out_of_range& e) {
76       {
77         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what()));
78       };
79     } catch (std::exception& e) {
80       {
81         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what()));
82       };
83     } catch (...) {
84       {
85         SWIG_CSharpException(SWIG_UnknownError, "unknown error");
86       };
87     }
88   }
89 }
90
91
92
93 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_FlexLayout_AddChild(void * jarg1, void *jarg2, Dali::Toolkit::Flex::MeasureCallback jarg3, int jarg4)
94 {
95   Dali::Toolkit::Flex::Node* arg1 = (Dali::Toolkit::Flex::Node* )jarg1;
96   Dali::Actor *arg2 = (Dali::Actor *) 0;  arg2 = (Dali::Actor *)jarg2;
97
98   {
99     try {
100         arg1->Dali::Toolkit::Flex::Node::AddChild((Dali::Actor &)*arg2, jarg3, jarg4);
101     } catch (std::out_of_range& e) {
102       {
103         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what()));
104       };
105     } catch (std::exception& e) {
106       {
107         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what()));
108       };
109     } catch (...) {
110       {
111         SWIG_CSharpException(SWIG_UnknownError, "unknown error");
112       };
113     }
114   }
115 }
116
117 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_FlexLayout_RemoveChild(void * jarg1, void * jarg2)
118 {
119   Dali::Toolkit::Flex::Node *arg1 = (Dali::Toolkit::Flex::Node *) 0 ;
120   Dali::Actor* arg2 = (Dali::Actor *)jarg2;
121
122   arg1 = (Dali::Toolkit::Flex::Node*)jarg1;
123   {
124     try {
125       arg1->Dali::Toolkit::Flex::Node::RemoveChild(*arg2);
126     } catch (std::out_of_range& e) {
127       {
128         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what()));
129       };
130     } catch (std::exception& e) {
131       {
132         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what()));
133       };
134     } catch (...) {
135       {
136         SWIG_CSharpException(SWIG_UnknownError, "unknown error");
137       };
138     }
139   }
140 }
141
142 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_FlexLayout_CalculateLayout(void * jarg1, float jarg2, float jarg3, bool isRtl )
143 {
144   Dali::Toolkit::Flex::Node * arg1 = (Dali::Toolkit::Flex::Node* )jarg1;
145   {
146     try {
147       arg1->Dali::Toolkit::Flex::Node::CalculateLayout(jarg2, jarg3, isRtl);
148     } catch (std::out_of_range& e) {
149       {
150         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what()));
151       };
152     } catch (std::exception& e) {
153       {
154         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what()));
155       };
156     } catch (...) {
157       {
158         SWIG_CSharpException(SWIG_UnknownError, "unknown error");
159       };
160     }
161   }
162 }
163
164 SWIGEXPORT float SWIGSTDCALL CSharp_Dali_FlexLayout_GetWidth(void * jarg1 )
165 {
166   Dali::Toolkit::Flex::Node* arg1 = (Dali::Toolkit::Flex::Node* )jarg1 ;
167   float result = 0.0f;
168   {
169     try {
170       result = arg1->Dali::Toolkit::Flex::Node::GetFlexWidth();
171     } catch (std::out_of_range& e) {
172       {
173         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what()));
174       };
175     } catch (std::exception& e) {
176       {
177         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what()));
178       };
179     } catch (...) {
180       {
181         SWIG_CSharpException(SWIG_UnknownError, "unknown error");
182       };
183     }
184   }
185   return result;
186 }
187
188
189 SWIGEXPORT float SWIGSTDCALL CSharp_Dali_FlexLayout_GetHeight(void * jarg1 )
190 {
191   float result = 0.0f;
192   Dali::Toolkit::Flex::Node* arg1 = (Dali::Toolkit::Flex::Node* )jarg1 ;
193   {
194     try {
195       result = arg1->Dali::Toolkit::Flex::Node::GetFlexHeight();
196     } catch (std::out_of_range& e) {
197       {
198         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what()));
199       };
200     } catch (std::exception& e) {
201       {
202         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what()));
203       };
204     } catch (...) {
205       {
206         SWIG_CSharpException(SWIG_UnknownError, "unknown error");
207       };
208     }
209   }
210   return result;
211 }
212
213 SWIGEXPORT void* SWIGSTDCALL CSharp_Dali_FlexLayout_GetNodeFrame( void * jarg1, int index )
214 {
215   Dali::Toolkit::Flex::Node *arg1 = (Dali::Toolkit::Flex::Node *) 0 ;
216   arg1 = (Dali::Toolkit::Flex::Node *)jarg1;
217   Dali::Vector4 result;
218   void* jresult;
219   {
220     try {
221       result = arg1->Dali::Toolkit::Flex::Node::GetNodeFrame(index);
222     } catch (std::out_of_range& e) {
223       {
224         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what()));
225       };
226     } catch (std::exception& e) {
227       {
228         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what()));
229       };
230     } catch (...) {
231       {
232         SWIG_CSharpException(SWIG_UnknownError, "unknown error");
233       };
234     }
235   }
236
237   jresult = new Dali::Vector4((const Dali::Vector4 &)result);
238   return jresult;
239 }
240
241 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_FlexLayout_SetMargin(void * jarg1, void * jarg2)
242 {
243   Dali::Toolkit::Flex::Node *arg1 = (Dali::Toolkit::Flex::Node *) 0 ;
244
245   arg1 = (Dali::Toolkit::Flex::Node *)jarg1;
246   Dali::Extents* arg2 = (Dali::Extents *)jarg2;
247   {
248     try {
249       arg1->Dali::Toolkit::Flex::Node::SetMargin( *arg2);
250     } catch (std::out_of_range& e) {
251       {
252         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what()));
253       };
254     } catch (std::exception& e) {
255       {
256         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what()));
257       };
258     } catch (...) {
259       {
260         SWIG_CSharpException(SWIG_UnknownError, "unknown error");
261       };
262     }
263   }
264 }
265
266 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_FlexLayout_SetPadding(void * jarg1, void * jarg2)
267 {
268   Dali::Toolkit::Flex::Node *arg1 = (Dali::Toolkit::Flex::Node *) 0 ;
269
270   arg1 = (Dali::Toolkit::Flex::Node *)jarg1;
271   Dali::Extents* arg2 = (Dali::Extents *)jarg2;
272   {
273     try {
274       arg1->Dali::Toolkit::Flex::Node::SetPadding( *arg2);
275     } catch (std::out_of_range& e) {
276       {
277         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what()));
278       };
279     } catch (std::exception& e) {
280       {
281         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what()));
282       };
283     } catch (...) {
284       {
285         SWIG_CSharpException(SWIG_UnknownError, "unknown error");
286       };
287     }
288   }
289 }
290
291 SWIGEXPORT int SWIGSTDCALL CSharp_Dali_FlexLayout_GetFlexDirection(void * jarg1)
292 {
293   int jresult ;
294   Dali::Toolkit::Flex::Node *arg1 = (Dali::Toolkit::Flex::Node *) 0 ;
295   Dali::Toolkit::Flex::FlexDirection result;
296
297   arg1 = (Dali::Toolkit::Flex::Node *)jarg1;
298   {
299     try {
300       result = (Dali::Toolkit::Flex::FlexDirection)arg1->Dali::Toolkit::Flex::Node::GetFlexDirection();
301     } catch (std::out_of_range& e) {
302       {
303         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
304       };
305     } catch (std::exception& e) {
306       {
307         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
308       };
309     } catch (...) {
310       {
311         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
312       };
313     }
314   }
315   jresult = (int)result;
316   return jresult;
317 }
318
319
320 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_FlexLayout_SetFlexJustification(void * jarg1, int jarg2)
321 {
322   Dali::Toolkit::Flex::Node *arg1 = (Dali::Toolkit::Flex::Node *) 0 ;
323   Dali::Toolkit::Flex::Justification arg2 ;
324
325   arg1 = (Dali::Toolkit::Flex::Node *)jarg1;
326   arg2 = (Dali::Toolkit::Flex::Justification)jarg2;
327   {
328     try {
329       arg1->Dali::Toolkit::Flex::Node::SetFlexJustification(arg2);
330     } catch (std::out_of_range& e) {
331       {
332         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
333       };
334     } catch (std::exception& e) {
335       {
336         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
337       };
338     } catch (...) {
339       {
340         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
341       };
342     }
343   }
344 }
345
346
347 SWIGEXPORT int SWIGSTDCALL CSharp_Dali_FlexLayout_GetFlexJustification(void * jarg1)
348 {
349   int jresult ;
350   Dali::Toolkit::Flex::Node *arg1 = (Dali::Toolkit::Flex::Node *) 0 ;
351   Dali::Toolkit::Flex::Justification result;
352
353   arg1 = (Dali::Toolkit::Flex::Node *)jarg1;
354   {
355     try {
356       result = (Dali::Toolkit::Flex::Justification)arg1->Dali::Toolkit::Flex::Node::GetFlexJustification();
357     } catch (std::out_of_range& e) {
358       {
359         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
360       };
361     } catch (std::exception& e) {
362       {
363         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
364       };
365     } catch (...) {
366       {
367         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
368       };
369     }
370   }
371   jresult = (int)result;
372   return jresult;
373 }
374
375
376 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_FlexLayout_SetFlexWrap(void * jarg1, int jarg2)
377 {
378
379   Dali::Toolkit::Flex::Node* arg1 = (Dali::Toolkit::Flex::Node *)jarg1;
380   Dali::Toolkit::Flex::WrapType arg2 = (Dali::Toolkit::Flex::WrapType)jarg2;
381   {
382     try {
383       arg1->Dali::Toolkit::Flex::Node::SetFlexWrap(arg2);
384     } catch (std::out_of_range& e) {
385       {
386         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
387       };
388     } catch (std::exception& e) {
389       {
390         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
391       };
392     } catch (...) {
393       {
394         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
395       };
396     }
397   }
398 }
399
400
401 SWIGEXPORT int SWIGSTDCALL CSharp_Dali_FlexLayout_GetFlexWrap(void * jarg1)
402 {
403   int jresult ;
404   Dali::Toolkit::Flex::Node *arg1 = (Dali::Toolkit::Flex::Node *) 0 ;
405   Dali::Toolkit::Flex::WrapType result;
406
407   arg1 = (Dali::Toolkit::Flex::Node *)jarg1;
408   {
409     try {
410       result = (Dali::Toolkit::Flex::WrapType)arg1->Dali::Toolkit::Flex::Node::GetFlexWrap();
411     } catch (std::out_of_range& e) {
412       {
413         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
414       };
415     } catch (std::exception& e) {
416       {
417         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
418       };
419     } catch (...) {
420       {
421         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
422       };
423     }
424   }
425   jresult = (int)result;
426   return jresult;
427 }
428
429
430 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_FlexLayout_SetFlexAlignment(void * jarg1, int jarg2)
431 {
432   Dali::Toolkit::Flex::Node *arg1 = (Dali::Toolkit::Flex::Node *) 0 ;
433   Dali::Toolkit::Flex::Alignment arg2 ;
434
435   arg1 = (Dali::Toolkit::Flex::Node *)jarg1;
436   arg2 = (Dali::Toolkit::Flex::Alignment)jarg2;
437   {
438     try {
439       arg1->Dali::Toolkit::Flex::Node::SetFlexAlignment(arg2);
440     } catch (std::out_of_range& e) {
441       {
442         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
443       };
444     } catch (std::exception& e) {
445       {
446         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
447       };
448     } catch (...) {
449       {
450         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
451       };
452     }
453   }
454 }
455
456
457 SWIGEXPORT int SWIGSTDCALL CSharp_Dali_FlexLayout_GetFlexAlignment(void * jarg1)
458 {
459   int jresult ;
460   Dali::Toolkit::Flex::Node *arg1 = (Dali::Toolkit::Flex::Node *) 0 ;
461   Dali::Toolkit::Flex::Alignment result;
462
463   arg1 = (Dali::Toolkit::Flex::Node *)jarg1;
464   {
465     try {
466       result = (Dali::Toolkit::Flex::Alignment)arg1->Dali::Toolkit::Flex::Node::GetFlexAlignment();
467     } catch (std::out_of_range& e) {
468       {
469         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
470       };
471     } catch (std::exception& e) {
472       {
473         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
474       };
475     } catch (...) {
476       {
477         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
478       };
479     }
480   }
481   jresult = (int)result;
482   return jresult;
483 }
484
485
486 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_FlexLayout_SetFlexItemsAlignment(void * jarg1, int jarg2)
487 {
488   Dali::Toolkit::Flex::Node *arg1 = (Dali::Toolkit::Flex::Node *) 0 ;
489   Dali::Toolkit::Flex::Alignment arg2 ;
490
491   arg1 = (Dali::Toolkit::Flex::Node *)jarg1;
492   arg2 = (Dali::Toolkit::Flex::Alignment)jarg2;
493   {
494     try {
495       arg1->Dali::Toolkit::Flex::Node::SetFlexItemsAlignment(arg2);
496     } catch (std::out_of_range& e) {
497       {
498         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
499       };
500     } catch (std::exception& e) {
501       {
502         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
503       };
504     } catch (...) {
505       {
506         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
507       };
508     }
509   }
510 }
511
512
513 SWIGEXPORT int SWIGSTDCALL CSharp_Dali_FlexLayout_GetFlexItemsAlignment(void * jarg1)
514 {
515   int jresult ;
516   Dali::Toolkit::Flex::Node *arg1 = (Dali::Toolkit::Flex::Node *) 0 ;
517   Dali::Toolkit::Flex::Alignment result;
518
519   arg1 = (Dali::Toolkit::Flex::Node *)jarg1;
520   {
521     try {
522       result = (Dali::Toolkit::Flex::Alignment)arg1->Dali::Toolkit::Flex::Node::GetFlexItemsAlignment();
523     } catch (std::out_of_range& e) {
524       {
525         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
526       };
527     } catch (std::exception& e) {
528       {
529         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
530       };
531     } catch (...) {
532       {
533         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
534       };
535     }
536   }
537   jresult = (int)result;
538   return jresult;
539 }
540
541
542
543 #ifdef __cplusplus
544 }
545 #endif