dali-csharp-binder tizen branch => devel/master back sync
[platform/core/uifw/dali-csharp-binder.git] / dali-csharp-binder / src / input-method-options.cpp
1 /** Copyright (c) 2017 Samsung Electronics Co., Ltd.
2 *
3 * Licensed under the Apache License, Version 2.0 (the "License");
4 * you may not use this file except in compliance with the License.
5 * You may obtain a copy of the License at
6 *
7 * http://www.apache.org/licenses/LICENSE-2.0
8 *
9 * Unless required by applicable law or agreed to in writing, software
10 * distributed under the License is distributed on an "AS IS" BASIS,
11 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 * See the License for the specific language governing permissions and
13 * limitations under the License.
14 *
15 */
16
17 #include "common.h"
18 #include <dali/devel-api/adaptor-framework/input-method-options.h>
19
20
21 #ifdef __cplusplus
22 extern "C" {
23 #endif
24
25
26 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_InputMethodOptions() {
27   void * jresult ;
28   Dali::InputMethodOptions *result = 0 ;
29
30   {
31     try {
32       result = (Dali::InputMethodOptions *)new Dali::InputMethodOptions();
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 (Dali::DaliException e) {
42       {
43         SWIG_CSharpException(SWIG_UnknownError, e.condition); return 0;
44       };
45     } catch (...) {
46       {
47         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
48       };
49     }
50   }
51
52   jresult = (void *)result;
53   return jresult;
54 }
55
56
57 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_InputMethodOptions_IsPassword(void * jarg1) {
58   unsigned int jresult ;
59   Dali::InputMethodOptions *arg1 = (Dali::InputMethodOptions *) 0 ;
60   bool result;
61
62   arg1 = (Dali::InputMethodOptions *)jarg1;
63   {
64     try {
65       result = (bool)(arg1)->IsPassword();
66     } catch (std::out_of_range& e) {
67       {
68         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
69       };
70     } catch (std::exception& e) {
71       {
72         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
73       };
74     } catch (Dali::DaliException e) {
75       {
76         SWIG_CSharpException(SWIG_UnknownError, e.condition); return 0;
77       };
78     } catch (...) {
79       {
80         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
81       };
82     }
83   }
84
85   jresult = result;
86   return jresult;
87 }
88
89
90 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_InputMethodOptions_ApplyProperty(void * jarg1, void * jarg2) {
91   Dali::InputMethodOptions *arg1 = (Dali::InputMethodOptions *) 0 ;
92   Dali::Property::Map *arg2 = 0 ;
93
94   arg1 = (Dali::InputMethodOptions *)jarg1;
95   arg2 = (Dali::Property::Map *)jarg2;
96   if (!arg2) {
97     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Property::Map const & type is null", 0);
98     return ;
99   }
100   {
101     try {
102       (arg1)->ApplyProperty((Dali::Property::Map const &)*arg2);
103     } catch (std::out_of_range& e) {
104       {
105         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
106       };
107     } catch (std::exception& e) {
108       {
109         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
110       };
111     } catch (Dali::DaliException e) {
112       {
113         SWIG_CSharpException(SWIG_UnknownError, e.condition); return ;
114       };
115     } catch (...) {
116       {
117         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
118       };
119     }
120   }
121
122 }
123
124
125 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_InputMethodOptions_RetrieveProperty(void * jarg1, void * jarg2) {
126   Dali::InputMethodOptions *arg1 = (Dali::InputMethodOptions *) 0 ;
127   Dali::Property::Map *arg2 = 0 ;
128
129   arg1 = (Dali::InputMethodOptions *)jarg1;
130   arg2 = (Dali::Property::Map *)jarg2;
131   if (!arg2) {
132     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Property::Map & type is null", 0);
133     return ;
134   }
135   {
136     try {
137       (arg1)->RetrieveProperty(*arg2);
138     } catch (std::out_of_range& e) {
139       {
140         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
141       };
142     } catch (std::exception& e) {
143       {
144         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
145       };
146     } catch (Dali::DaliException e) {
147       {
148         SWIG_CSharpException(SWIG_UnknownError, e.condition); return ;
149       };
150     } catch (...) {
151       {
152         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
153       };
154     }
155   }
156
157 }
158
159
160 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_InputMethodOptions_CompareAndSet(void * jarg1, int jarg2, void * jarg3, void * jarg4) {
161   unsigned int jresult ;
162   Dali::InputMethodOptions *arg1 = (Dali::InputMethodOptions *) 0 ;
163   Dali::InputMethod::Category::Type arg2 ;
164   Dali::InputMethodOptions *arg3 = 0 ;
165   int *arg4 = 0 ;
166   bool result;
167
168   arg1 = (Dali::InputMethodOptions *)jarg1;
169   arg2 = (Dali::InputMethod::Category::Type)jarg2;
170   arg3 = (Dali::InputMethodOptions *)jarg3;
171   if (!arg3) {
172     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::InputMethodOptions const & type is null", 0);
173     return 0;
174   }
175   arg4 = (int *)jarg4;
176   if (!arg4) {
177     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "int & type is null", 0);
178     return 0;
179   }
180   {
181     try {
182       result = (bool)(arg1)->CompareAndSet(arg2,(Dali::InputMethodOptions const &)*arg3,*arg4);
183     } catch (std::out_of_range& e) {
184       {
185         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
186       };
187     } catch (std::exception& e) {
188       {
189         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
190       };
191     } catch (Dali::DaliException e) {
192       {
193         SWIG_CSharpException(SWIG_UnknownError, e.condition); return 0;
194       };
195     } catch (...) {
196       {
197         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
198       };
199     }
200   }
201
202   jresult = result;
203   return jresult;
204 }
205
206
207 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_InputMethodOptions(void * jarg1) {
208   Dali::InputMethodOptions *arg1 = (Dali::InputMethodOptions *) 0 ;
209
210   arg1 = (Dali::InputMethodOptions *)jarg1;
211   {
212     try {
213       delete arg1;
214     } catch (std::out_of_range& e) {
215       {
216         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
217       };
218     } catch (std::exception& e) {
219       {
220         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
221       };
222     } catch (Dali::DaliException e) {
223       {
224         SWIG_CSharpException(SWIG_UnknownError, e.condition); return ;
225       };
226     } catch (...) {
227       {
228         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
229       };
230     }
231   }
232
233 }
234
235 #ifdef __cplusplus
236 }
237 #endif
238