647692cc72cba8d943d775aff99b784e278988be
[platform/core/uifw/dali-csharp-binder.git] / dali-csharp-binder / widget-viewer-dali / widget-view-manager-wrap.cpp
1 /*
2  * Copyright (c) 2017 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 // EXTERNAL INCLUDES
19 #include <widget_viewer_dali/public_api/widget_view_manager/widget_view_manager.h>
20 #include <widget_viewer_dali/public_api/widget_view/widget_view.h>
21
22 // INTERNAL INCLUDES
23 #include <dali-csharp-binder/common/common.h>
24
25 #ifdef __cplusplus
26 extern "C"
27 {
28 #endif
29
30   SWIGEXPORT Dali::BaseHandle *SWIGSTDCALL CSharp_Dali_WidgetViewManager_SWIGUpcast(Dali::WidgetView::WidgetViewManager *jarg1)
31   {
32     return (Dali::BaseHandle *)jarg1;
33   }
34
35   SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_WidgetViewManager_New(void *jarg1, char *jarg2)
36   {
37     void *jresult;
38     Dali::Application arg1;
39     std::string *arg2 = 0;
40     Dali::Application *argp1;
41     Dali::WidgetView::WidgetViewManager result;
42
43     argp1 = (Dali::Application *)jarg1;
44     if (!argp1)
45     {
46       SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Application", 0);
47       return 0;
48     }
49     arg1 = *argp1;
50     if (!jarg2)
51     {
52       SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
53       return 0;
54     }
55     std::string arg2_str(jarg2);
56     arg2 = &arg2_str;
57     {
58       try
59       {
60         result = Dali::WidgetView::WidgetViewManager::New(arg1, (std::string const &)*arg2);
61       }
62       CALL_CATCH_EXCEPTION(0);
63     }
64
65     jresult = new Dali::WidgetView::WidgetViewManager((const Dali::WidgetView::WidgetViewManager &)result);
66
67     //argout typemap for const std::string&
68
69     return jresult;
70   }
71
72   SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_WidgetViewManager_DownCast(void *jarg1)
73   {
74     void *jresult;
75     Dali::BaseHandle arg1;
76     Dali::BaseHandle *argp1;
77     Dali::WidgetView::WidgetViewManager result;
78
79     argp1 = (Dali::BaseHandle *)jarg1;
80     if (!argp1)
81     {
82       SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::BaseHandle", 0);
83       return 0;
84     }
85     arg1 = *argp1;
86     {
87       try
88       {
89         result = Dali::WidgetView::WidgetViewManager::DownCast(arg1);
90       }
91       CALL_CATCH_EXCEPTION(0);
92     }
93
94     jresult = new Dali::WidgetView::WidgetViewManager((const Dali::WidgetView::WidgetViewManager &)result);
95     return jresult;
96   }
97
98   SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_new_WidgetViewManager__SWIG_0()
99   {
100     void *jresult;
101     Dali::WidgetView::WidgetViewManager *result = 0;
102
103     {
104       try
105       {
106         result = (Dali::WidgetView::WidgetViewManager *)new Dali::WidgetView::WidgetViewManager();
107       }
108       CALL_CATCH_EXCEPTION(0);
109     }
110
111     jresult = (void *)result;
112     return jresult;
113   }
114
115   SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_new_WidgetViewManager__SWIG_1(void *jarg1)
116   {
117     void *jresult;
118     Dali::WidgetView::WidgetViewManager *arg1 = 0;
119     Dali::WidgetView::WidgetViewManager *result = 0;
120
121     arg1 = (Dali::WidgetView::WidgetViewManager *)jarg1;
122     if (!arg1)
123     {
124       SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::WidgetView::WidgetViewManager const & type is null", 0);
125       return 0;
126     }
127     {
128       try
129       {
130         result = (Dali::WidgetView::WidgetViewManager *)new Dali::WidgetView::WidgetViewManager((Dali::WidgetView::WidgetViewManager const &)*arg1);
131       }
132       CALL_CATCH_EXCEPTION(0);
133     }
134
135     jresult = (void *)result;
136     return jresult;
137   }
138
139   SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_WidgetViewManager_Assign(void *jarg1, void *jarg2)
140   {
141     void *jresult;
142     Dali::WidgetView::WidgetViewManager *arg1 = (Dali::WidgetView::WidgetViewManager *)0;
143     Dali::WidgetView::WidgetViewManager *arg2 = 0;
144     Dali::WidgetView::WidgetViewManager *result = 0;
145
146     arg1 = (Dali::WidgetView::WidgetViewManager *)jarg1;
147     arg2 = (Dali::WidgetView::WidgetViewManager *)jarg2;
148     if (!arg2)
149     {
150       SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::WidgetView::WidgetViewManager const & type is null", 0);
151       return 0;
152     }
153     {
154       try
155       {
156         result = (Dali::WidgetView::WidgetViewManager *)&(arg1)->operator=((Dali::WidgetView::WidgetViewManager const &)*arg2);
157       }
158       CALL_CATCH_EXCEPTION(0);
159     }
160
161     jresult = (void *)result;
162     return jresult;
163   }
164
165   SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_WidgetViewManager(void *jarg1)
166   {
167     Dali::WidgetView::WidgetViewManager *arg1 = (Dali::WidgetView::WidgetViewManager *)0;
168
169     arg1 = (Dali::WidgetView::WidgetViewManager *)jarg1;
170     {
171       try
172       {
173         delete arg1;
174       }
175       CALL_CATCH_EXCEPTION();
176     }
177   }
178
179   SWIGEXPORT void *SWIGSTDCALL CSharp_Dali_WidgetViewManager_AddWidget(void *jarg1, char *jarg2, char *jarg3, int jarg4, int jarg5, float jarg6)
180   {
181     void *jresult;
182     Dali::WidgetView::WidgetViewManager *arg1 = (Dali::WidgetView::WidgetViewManager *)0;
183     std::string *arg2 = 0;
184     std::string *arg3 = 0;
185     int arg4;
186     int arg5;
187     float arg6;
188     Dali::WidgetView::WidgetView result;
189
190     arg1 = (Dali::WidgetView::WidgetViewManager *)jarg1;
191     if (!jarg2)
192     {
193       SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
194       return 0;
195     }
196     std::string arg2_str(jarg2);
197     arg2 = &arg2_str;
198     if (!jarg3)
199     {
200       SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
201       return 0;
202     }
203     std::string arg3_str(jarg3);
204     arg3 = &arg3_str;
205     arg4 = (int)jarg4;
206     arg5 = (int)jarg5;
207     arg6 = (float)jarg6;
208     {
209       try
210       {
211         result = (arg1)->AddWidget((std::string const &)*arg2, (std::string const &)*arg3, arg4, arg5, arg6);
212       }
213       CALL_CATCH_EXCEPTION(0);
214     }
215
216     jresult = new Dali::WidgetView::WidgetView((const Dali::WidgetView::WidgetView &)result);
217     return jresult;
218   }
219
220   SWIGEXPORT bool SWIGSTDCALL CSharp_Dali_WidgetViewManager_RemoveWidget(void *jarg1, void *jarg2)
221   {
222     bool jresult;
223     Dali::WidgetView::WidgetViewManager *widgetViewManager = (Dali::WidgetView::WidgetViewManager *)0;
224     Dali::WidgetView::WidgetView *widgetView = (Dali::WidgetView::WidgetView *)0;
225     bool result;
226
227     widgetViewManager = (Dali::WidgetView::WidgetViewManager *)jarg1;
228     widgetView = (Dali::WidgetView::WidgetView *)jarg2;
229     {
230       try
231       {
232         result = (widgetViewManager)->RemoveWidget(*widgetView);
233       }
234       CALL_CATCH_EXCEPTION(0);
235     }
236
237     jresult = result;
238     return jresult;
239   }
240 #ifdef __cplusplus
241 }
242 #endif