Merge "Updates needed after encapsulation and harmonizing operators for LayoutLength...
[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::LayoutSize *result = 0 ;
55
56   {
57     try {
58       result = (Dali::Toolkit::LayoutSize *)new Dali::Toolkit::LayoutSize(jarg1,jarg2);
59     } catch (std::out_of_range& e) {
60       {
61         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
62       };
63     } catch (std::exception& e) {
64       {
65         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
66       };
67     } catch (...) {
68       {
69         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
70       };
71     }
72   }
73   jresult = (void *)result;
74   return jresult;
75 }
76
77
78 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_LayoutSize__SWIG_2(void * jarg1) {
79   void * jresult ;
80   Dali::Toolkit::LayoutSize *arg1 = 0 ;
81   Dali::Toolkit::LayoutSize *result = 0 ;
82
83   arg1 = (Dali::Toolkit::LayoutSize *)jarg1;
84   if (!arg1) {
85     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Toolkit::LayoutSize const & type is null", 0);
86     return 0;
87   }
88   {
89     try {
90       result = (Dali::Toolkit::LayoutSize *)new Dali::Toolkit::LayoutSize((Dali::Toolkit::LayoutSize const &)*arg1);
91     } catch (std::out_of_range& e) {
92       {
93         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
94       };
95     } catch (std::exception& e) {
96       {
97         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
98       };
99     } catch (...) {
100       {
101         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
102       };
103     }
104   }
105   jresult = (void *)result;
106   return jresult;
107 }
108
109
110 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_LayoutSize_Assign(void * jarg1, void * jarg2) {
111   void * jresult ;
112   Dali::Toolkit::LayoutSize *arg1 = (Dali::Toolkit::LayoutSize *) 0 ;
113   Dali::Toolkit::LayoutSize *arg2 = 0 ;
114   Dali::Toolkit::LayoutSize *result = 0 ;
115
116   arg1 = (Dali::Toolkit::LayoutSize *)jarg1;
117   arg2 = (Dali::Toolkit::LayoutSize *)jarg2;
118   if (!arg2) {
119     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Toolkit::LayoutSize const & type is null", 0);
120     return 0;
121   }
122   {
123     try {
124       result = (Dali::Toolkit::LayoutSize *) &(arg1)->operator =((Dali::Toolkit::LayoutSize 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 int SWIGSTDCALL CSharp_Dali_LayoutSize_GetWidth(void * jarg1) {
145   Dali::Toolkit::LayoutSize* arg1 = (Dali::Toolkit::LayoutSize *) jarg1;
146   return (int)(arg1)->GetWidth().AsInteger();
147 }
148
149
150 SWIGEXPORT int SWIGSTDCALL CSharp_Dali_LayoutSize_GetHeight(void * jarg1) {
151   Dali::Toolkit::LayoutSize* arg1 = (Dali::Toolkit::LayoutSize *) jarg1;
152   return (int)(arg1)->GetHeight().AsInteger();
153 }
154
155
156 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_LayoutSize_SetWidth__SWIG_0(void * jarg1, int jarg2) {
157   Dali::Toolkit::LayoutSize *arg1 = (Dali::Toolkit::LayoutSize *)jarg1;
158   (arg1)->SetWidth(jarg2);
159 }
160
161
162 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_LayoutSize_SetHeight__SWIG_0(void * jarg1, int jarg2) {
163   Dali::Toolkit::LayoutSize *arg1 = (Dali::Toolkit::LayoutSize *)jarg1;
164   (arg1)->SetHeight(jarg2);
165 }
166
167
168 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_LayoutSize_SetWidth__SWIG_1(void * jarg1, void * jarg2) {
169   Dali::Toolkit::LayoutSize *arg1 = (Dali::Toolkit::LayoutSize *) 0 ;
170   SwigValueWrapper< Dali::Toolkit::LayoutLength > arg2 ;
171   Dali::Toolkit::LayoutLength *argp2 ;
172
173   arg1 = (Dali::Toolkit::LayoutSize *)jarg1;
174   argp2 = (Dali::Toolkit::LayoutLength *)jarg2;
175   if (!argp2) {
176     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Toolkit::LayoutLength", 0);
177     return ;
178   }
179   arg2 = *argp2;
180   {
181     try {
182       (arg1)->SetWidth(arg2);
183     } catch (std::out_of_range& e) {
184       {
185         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
186       };
187     } catch (std::exception& e) {
188       {
189         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
190       };
191     } catch (...) {
192       {
193         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
194       };
195     }
196   }
197 }
198
199
200 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_LayoutSize_SetHeight__SWIG_1(void * jarg1, void * jarg2) {
201   Dali::Toolkit::LayoutSize *arg1 = (Dali::Toolkit::LayoutSize *) 0 ;
202   SwigValueWrapper< Dali::Toolkit::LayoutLength > arg2 ;
203   Dali::Toolkit::LayoutLength *argp2 ;
204
205   arg1 = (Dali::Toolkit::LayoutSize *)jarg1;
206   argp2 = (Dali::Toolkit::LayoutLength *)jarg2;
207   if (!argp2) {
208     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Toolkit::LayoutLength", 0);
209     return ;
210   }
211   arg2 = *argp2;
212   {
213     try {
214       (arg1)->SetHeight(arg2);
215     } catch (std::out_of_range& e) {
216       {
217         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
218       };
219     } catch (std::exception& e) {
220       {
221         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
222       };
223     } catch (...) {
224       {
225         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
226       };
227     }
228   }
229 }
230
231
232 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_LayoutSize_EqualTo(void * jarg1, void * jarg2) {
233   unsigned int jresult ;
234   Dali::Toolkit::LayoutSize *arg1 = (Dali::Toolkit::LayoutSize *) 0 ;
235   Dali::Toolkit::LayoutSize *arg2 = 0 ;
236   bool result;
237
238   arg1 = (Dali::Toolkit::LayoutSize *)jarg1;
239   arg2 = (Dali::Toolkit::LayoutSize *)jarg2;
240   if (!arg2) {
241     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Toolkit::LayoutSize const & type is null", 0);
242     return 0;
243   }
244   {
245     try {
246       result = (bool)(arg1)->operator ==((Dali::Toolkit::LayoutSize const &)*arg2);
247     } catch (std::out_of_range& e) {
248       {
249         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
250       };
251     } catch (std::exception& e) {
252       {
253         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
254       };
255     } catch (...) {
256       {
257         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
258       };
259     }
260   }
261   jresult = result;
262   return jresult;
263 }
264
265
266 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_LayoutSize_x_set(void * jarg1, int jarg2) {
267   Dali::Toolkit::LayoutSize *arg1 = (Dali::Toolkit::LayoutSize *) 0 ;
268
269   arg1 = (Dali::Toolkit::LayoutSize *)jarg1;
270   if (arg1) (arg1)->x = jarg2;
271 }
272
273
274 SWIGEXPORT int SWIGSTDCALL CSharp_Dali_LayoutSize_x_get(void * jarg1) {
275   Dali::Toolkit::LayoutSize *arg1 = (Dali::Toolkit::LayoutSize *) jarg1;
276   return (int) ((arg1)->x.AsInteger());
277 }
278
279
280 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_LayoutSize_width_set(void * jarg1, int jarg2) {
281   Dali::Toolkit::LayoutSize *arg1 = (Dali::Toolkit::LayoutSize *) jarg1;
282
283   if (arg1) (arg1)->width = jarg2;
284 }
285
286
287 SWIGEXPORT int SWIGSTDCALL CSharp_Dali_LayoutSize_width_get(void * jarg1) {
288   Dali::Toolkit::LayoutSize *arg1 = (Dali::Toolkit::LayoutSize *) jarg1;
289   return (int) ((arg1)->width.AsInteger());
290 }
291
292
293 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_LayoutSize_y_set(void * jarg1, int jarg2) {
294   Dali::Toolkit::LayoutSize *arg1 = (Dali::Toolkit::LayoutSize *) jarg1;
295
296   if (arg1) (arg1)->y = jarg2;
297 }
298
299
300 SWIGEXPORT int SWIGSTDCALL CSharp_Dali_LayoutSize_y_get(void * jarg1) {
301   Dali::Toolkit::LayoutSize *arg1 = (Dali::Toolkit::LayoutSize *) jarg1;
302   return (int) ((arg1)->x.AsInteger());
303 }
304
305
306 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_LayoutSize_height_set(void * jarg1, int jarg2) {
307   Dali::Toolkit::LayoutSize *arg1 = (Dali::Toolkit::LayoutSize *) jarg1;
308
309   if (arg1) (arg1)->height = jarg2;
310 }
311
312
313 SWIGEXPORT int SWIGSTDCALL CSharp_Dali_LayoutSize_height_get(void * jarg1) {
314   Dali::Toolkit::LayoutSize *arg1 = (Dali::Toolkit::LayoutSize *) jarg1;
315   return (int) ((arg1)->height.AsInteger());
316 }
317
318 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_LayoutSize(void * jarg1) {
319   Dali::Toolkit::LayoutSize *arg1 = (Dali::Toolkit::LayoutSize *) 0 ;
320
321   arg1 = (Dali::Toolkit::LayoutSize *)jarg1;
322   {
323     try {
324       delete arg1;
325     } catch (std::out_of_range& e) {
326       {
327         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
328       };
329     } catch (std::exception& e) {
330       {
331         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
332       };
333     } catch (...) {
334       {
335         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
336       };
337     }
338   }
339 }
340
341 #ifdef __cplusplus
342 }
343 #endif
344