manual binding for TextEditor
[platform/core/uifw/dali-csharp-binder.git] / dali-csharp-binder / src / text-editor.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 #ifndef CSHARP_TEXT_EDITOR
18 #define CSHARP_TEXT_EDITOR
19 #endif
20
21 #include "common.h"
22 #include <dali-toolkit/devel-api/controls/text-controls/text-editor-devel.h>
23
24 SWIGINTERN bool Dali_Signal_void_TextEditor_Scroll_Type__Empty(Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > const *self){
25   return self->Empty();
26 }
27 SWIGINTERN std::size_t Dali_Signal_void_TextEditor_Scroll_Type__GetConnectionCount(Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > const *self){
28   return self->GetConnectionCount();
29 }
30 SWIGINTERN void Dali_Signal_void_TextEditor_Scroll_Type__Connect(Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > *self,void (*func)(Dali::Toolkit::TextEditor,Dali::Toolkit::DevelTextEditor::Scroll::Type)){
31   self->Connect( func );
32 }
33 SWIGINTERN void Dali_Signal_void_TextEditor_Scroll_Type__Disconnect(Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > *self,void (*func)(Dali::Toolkit::TextEditor,Dali::Toolkit::DevelTextEditor::Scroll::Type)){
34   self->Disconnect( func );
35 }
36 SWIGINTERN void Dali_Signal_void_TextEditor_Scroll_Type__Emit(Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > *self,Dali::Toolkit::TextEditor arg1,Dali::Toolkit::DevelTextEditor::Scroll::Type arg2){
37   self->Emit( arg1, arg2 );
38 }
39
40 #ifdef __cplusplus
41 extern "C" {
42 #endif
43
44 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_TextEditor_ScrollStateChangedSignal(void * jarg1) {
45   void * jresult ;
46   Dali::Toolkit::TextEditor *arg1 = 0 ;
47   Dali::Toolkit::DevelTextEditor::ScrollStateChangedSignalType *result = 0 ;
48   
49   arg1 = (Dali::Toolkit::TextEditor *)jarg1;
50   if (!arg1) {
51     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Dali::Toolkit::TextEditor & type is null", 0);
52     return 0;
53   }
54   {
55     try {
56       result = (Dali::Toolkit::DevelTextEditor::ScrollStateChangedSignalType *) &Dali::Toolkit::DevelTextEditor::ScrollStateChangedSignal(*arg1);
57     } catch (std::out_of_range& e) {
58       {
59         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0; 
60       };
61     } catch (std::exception& e) {
62       {
63         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0; 
64       };
65     } catch (...) {
66       {
67         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0; 
68       };
69     }
70   }
71   jresult = (void *)result; 
72   return jresult;
73 }
74
75 SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Dali_ScrollStateChangedSignal_Empty(void * jarg1) {
76   unsigned int jresult ;
77   Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > *arg1 = (Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > *) 0 ;
78   bool result;
79   
80   arg1 = (Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > *)jarg1; 
81   {
82     try {
83       result = (bool)Dali_Signal_void_TextEditor_Scroll_Type__Empty((Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > const *)arg1);
84     } catch (std::out_of_range& e) {
85       {
86         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0; 
87       };
88     } catch (std::exception& e) {
89       {
90         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0; 
91       };
92     } catch (...) {
93       {
94         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0; 
95       };
96     }
97   }
98   jresult = result; 
99   return jresult;
100 }
101
102
103 SWIGEXPORT unsigned long SWIGSTDCALL CSharp_Dali_ScrollStateChangedSignal_GetConnectionCount(void * jarg1) {
104   unsigned long jresult ;
105   Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > *arg1 = (Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > *) 0 ;
106   std::size_t result;
107   
108   arg1 = (Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > *)jarg1; 
109   {
110     try {
111       result = Dali_Signal_void_TextEditor_Scroll_Type__GetConnectionCount((Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > const *)arg1);
112     } catch (std::out_of_range& e) {
113       {
114         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0; 
115       };
116     } catch (std::exception& e) {
117       {
118         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0; 
119       };
120     } catch (...) {
121       {
122         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0; 
123       };
124     }
125   }
126   jresult = (unsigned long)result; 
127   return jresult;
128 }
129
130
131 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_ScrollStateChangedSignal_Connect(void * jarg1, void * jarg2) {
132   Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > *arg1 = (Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > *) 0 ;
133   void (*arg2)(Dali::Toolkit::TextEditor,Dali::Toolkit::DevelTextEditor::Scroll::Type) = (void (*)(Dali::Toolkit::TextEditor,Dali::Toolkit::DevelTextEditor::Scroll::Type)) 0 ;
134   
135   arg1 = (Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > *)jarg1; 
136   arg2 = (void (*)(Dali::Toolkit::TextEditor,Dali::Toolkit::DevelTextEditor::Scroll::Type))jarg2; 
137   {
138     try {
139       Dali_Signal_void_TextEditor_Scroll_Type__Connect(arg1,arg2);
140     } catch (std::out_of_range& e) {
141       {
142         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ; 
143       };
144     } catch (std::exception& e) {
145       {
146         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ; 
147       };
148     } catch (...) {
149       {
150         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ; 
151       };
152     }
153   }
154 }
155
156
157 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_ScrollStateChangedSignal_Disconnect(void * jarg1, void * jarg2) {
158   Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > *arg1 = (Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > *) 0 ;
159   void (*arg2)(Dali::Toolkit::TextEditor,Dali::Toolkit::DevelTextEditor::Scroll::Type) = (void (*)(Dali::Toolkit::TextEditor,Dali::Toolkit::DevelTextEditor::Scroll::Type)) 0 ;
160   
161   arg1 = (Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > *)jarg1; 
162   arg2 = (void (*)(Dali::Toolkit::TextEditor,Dali::Toolkit::DevelTextEditor::Scroll::Type))jarg2; 
163   {
164     try {
165       Dali_Signal_void_TextEditor_Scroll_Type__Disconnect(arg1,arg2);
166     } catch (std::out_of_range& e) {
167       {
168         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ; 
169       };
170     } catch (std::exception& e) {
171       {
172         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ; 
173       };
174     } catch (...) {
175       {
176         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ; 
177       };
178     }
179   }
180 }
181
182
183 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_ScrollStateChangedSignal_Emit(void * jarg1, void * jarg2, int jarg3) {
184   Dali::Signal< void ( Dali::Toolkit::TextEditor,  Dali::Toolkit::DevelTextEditor::Scroll::Type ) > *arg1 = (Dali::Signal< void ( Dali::Toolkit::TextEditor,  Dali::Toolkit::DevelTextEditor::Scroll::Type ) > *) 0 ;
185   Dali::Toolkit::TextEditor arg2 ;
186   Dali::Toolkit::DevelTextEditor::Scroll::Type arg3;
187   Dali::Toolkit::TextEditor *argp2 ;
188   
189   arg1 = (Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > *)jarg1; 
190   argp2 = (Dali::Toolkit::TextEditor *)jarg2; 
191   arg3 = (Dali::Toolkit::DevelTextEditor::Scroll::Type)jarg3;
192   if (!argp2) {
193     SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Dali::Toolkit::TextEditor", 0);
194     return ;
195   }
196   arg2 = *argp2; 
197   {
198     try {
199       Dali_Signal_void_TextEditor_Scroll_Type__Emit(arg1,arg2,arg3);
200     } catch (std::out_of_range& e) {
201       {
202         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ; 
203       };
204     } catch (std::exception& e) {
205       {
206         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ; 
207       };
208     } catch (...) {
209       {
210         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ; 
211       };
212     }
213   }
214 }
215
216
217 SWIGEXPORT void * SWIGSTDCALL CSharp_Dali_new_ScrollStateChangedSignal() {
218   void * jresult ;
219   Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > *result = 0 ;
220   
221   {
222     try {
223       result = (Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > *)new Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) >();
224     } catch (std::out_of_range& e) {
225       {
226         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return 0; 
227       };
228     } catch (std::exception& e) {
229       {
230         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return 0; 
231       };
232     } catch (...) {
233       {
234         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return 0; 
235       };
236     }
237   }
238   jresult = (void *)result; 
239   return jresult;
240 }
241
242
243 SWIGEXPORT void SWIGSTDCALL CSharp_Dali_delete_ScrollStateChangedSignal(void * jarg1) {
244   Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > *arg1 = (Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > *) 0 ;
245   
246   arg1 = (Dali::Signal< void ( Dali::Toolkit::TextEditor, Dali::Toolkit::DevelTextEditor::Scroll::Type ) > *)jarg1; 
247   {
248     try {
249       delete arg1;
250     } catch (std::out_of_range& e) {
251       {
252         SWIG_CSharpException(SWIG_IndexError, const_cast<char*>(e.what())); return ; 
253       };
254     } catch (std::exception& e) {
255       {
256         SWIG_CSharpException(SWIG_RuntimeError, const_cast<char*>(e.what())); return ; 
257       };
258     } catch (...) {
259       {
260         SWIG_CSharpException(SWIG_UnknownError, "unknown error"); return ; 
261       };
262     }
263   }
264 }
265
266 #ifdef __cplusplus
267 }
268 #endif
269