Merge "Update uses of Visual Devel to Public" into devel/master
[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 (...) {
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 unsigned int SWIGSTDCALL CSharp_Dali_InputMethodOptions_IsPassword(void * jarg1) {
53   unsigned int jresult ;
54   Dali::InputMethodOptions *arg1 = (Dali::InputMethodOptions *) 0 ;
55   bool result;
56
57   arg1 = (Dali::InputMethodOptions *)jarg1;
58   {
59     try {
60       result = (bool)(arg1)->IsPassword();
61     } catch (std::out_of_range& e) {
62       {
63         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0;
64       };
65     } catch (std::exception& e) {
66       {
67         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0;
68       };
69     } catch (...) {
70       {
71         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0;
72       };
73     }
74   }
75   jresult = result;
76   return jresult;
77 }
78
79
80 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_InputMethodOptions_ApplyProperty(void * jarg1, void * jarg2) {
81   Dali::InputMethodOptions *arg1 = (Dali::InputMethodOptions *) 0 ;
82   Dali::Property::Map *arg2 = 0 ;
83
84   arg1 = (Dali::InputMethodOptions *)jarg1;
85   arg2 = (Dali::Property::Map *)jarg2;
86   if (!arg2) {
87     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Property::Map const & type is null", 0);
88     return ;
89   }
90   {
91     try {
92       (arg1)->ApplyProperty((Dali::Property::Map const &)*arg2);
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_InputMethodOptions_RetrieveProperty(void * jarg1, void * jarg2) {
111   Dali::InputMethodOptions *arg1 = (Dali::InputMethodOptions *) 0 ;
112   Dali::Property::Map *arg2 = 0 ;
113
114   arg1 = (Dali::InputMethodOptions *)jarg1;
115   arg2 = (Dali::Property::Map *)jarg2;
116   if (!arg2) {
117     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Property::Map & type is null", 0);
118     return ;
119   }
120   {
121     try {
122       (arg1)->RetrieveProperty(*arg2);
123     } catch (std::out_of_range& e) {
124       {
125         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
126       };
127     } catch (std::exception& e) {
128       {
129         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
130       };
131     } catch (...) {
132       {
133         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
134       };
135     }
136   }
137 }
138
139
140 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_InputMethodOptions_CompareAndSet(void * jarg1, int jarg2, void * jarg3, void * jarg4) {
141   unsigned int jresult ;
142   Dali::InputMethodOptions *arg1 = (Dali::InputMethodOptions *) 0 ;
143   Dali::InputMethod::Category::Type arg2 ;
144   Dali::InputMethodOptions *arg3 = 0 ;
145   int *arg4 = 0 ;
146   bool result;
147
148   arg1 = (Dali::InputMethodOptions *)jarg1;
149   arg2 = (Dali::InputMethod::Category::Type)jarg2;
150   arg3 = (Dali::InputMethodOptions *)jarg3;
151   if (!arg3) {
152     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::InputMethodOptions const & type is null", 0);
153     return 0;
154   }
155   arg4 = (int *)jarg4;
156   if (!arg4) {
157     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "int & type is null", 0);
158     return 0;
159   }
160   {
161     try {
162       result = (bool)(arg1)->CompareAndSet(arg2,(Dali::InputMethodOptions const &)*arg3,*arg4);
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 void SWIGSTDCALL CSharp_Dali_delete_InputMethodOptions(void * jarg1) {
183   Dali::InputMethodOptions *arg1 = (Dali::InputMethodOptions *) 0 ;
184
185   arg1 = (Dali::InputMethodOptions *)jarg1;
186   {
187     try {
188       delete arg1;
189     } catch (std::out_of_range& e) {
190       {
191         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ;
192       };
193     } catch (std::exception& e) {
194       {
195         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ;
196       };
197     } catch (...) {
198       {
199         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ;
200       };
201     }
202   }
203 }
204
205 #ifdef __cplusplus
206 }
207 #endif
208