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