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