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