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