f311b1078fadfd35c12864e956b7b4c3db646cba
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_access_editable_text.eo.cs
1 #pragma warning disable CS1591
2 using System;
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
5 using System.Linq;
6 using System.Threading;
7 using System.ComponentModel;
8 namespace Efl {
9
10 namespace Access {
11
12 namespace Editable {
13
14 /// <summary>Elementary editable text interface</summary>
15 [Efl.Access.Editable.ITextConcrete.NativeMethods]
16 [Efl.Eo.BindingEntity]
17 public interface IText : 
18     Efl.Eo.IWrapper, IDisposable
19 {
20     /// <summary>Editable content property</summary>
21 /// <param name="kw_string">Content</param>
22 /// <returns><c>true</c> if setting the value succeeded, <c>false</c> otherwise</returns>
23 bool SetTextContent(System.String kw_string);
24     /// <summary>Insert text at given position</summary>
25 /// <param name="kw_string">String to be inserted</param>
26 /// <param name="position">Position to insert string</param>
27 /// <returns><c>true</c> if insert succeeded, <c>false</c> otherwise</returns>
28 bool Insert(System.String kw_string, int position);
29     /// <summary>Copy text between start and end parameter</summary>
30 /// <param name="start">Start position to copy</param>
31 /// <param name="end">End position to copy</param>
32 /// <returns><c>true</c> if copy succeeded, <c>false</c> otherwise</returns>
33 bool Copy(int start, int end);
34     /// <summary>Cut text between start and end parameter</summary>
35 /// <param name="start">Start position to cut</param>
36 /// <param name="end">End position to cut</param>
37 /// <returns><c>true</c> if cut succeeded, <c>false</c> otherwise</returns>
38 bool Cut(int start, int end);
39     /// <summary>Delete text between start and end parameter</summary>
40 /// <param name="start">Start position to delete</param>
41 /// <param name="end">End position to delete</param>
42 /// <returns><c>true</c> if delete succeeded, <c>false</c> otherwise</returns>
43 bool Delete(int start, int end);
44     /// <summary>Paste text at given position</summary>
45 /// <param name="position">Position to insert text</param>
46 /// <returns><c>true</c> if paste succeeded, <c>false</c> otherwise</returns>
47 bool Paste(int position);
48                             /// <summary>Editable content property</summary>
49     /// <value>Content</value>
50     System.String TextContent {
51         set ;
52     }
53 }
54 /// <summary>Elementary editable text interface</summary>
55 sealed public class ITextConcrete :
56     Efl.Eo.EoWrapper
57     , IText
58     
59 {
60     ///<summary>Pointer to the native class description.</summary>
61     public override System.IntPtr NativeClass
62     {
63         get
64         {
65             if (((object)this).GetType() == typeof(ITextConcrete))
66             {
67                 return GetEflClassStatic();
68             }
69             else
70             {
71                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
72             }
73         }
74     }
75
76     /// <summary>Constructor to be used when objects are expected to be constructed from native code.</summary>
77     /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
78     private ITextConcrete(ConstructingHandle ch) : base(ch)
79     {
80     }
81
82     [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
83         efl_access_editable_text_interface_get();
84     /// <summary>Initializes a new instance of the <see cref="IText"/> class.
85     /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
86     /// <param name="wh">The native pointer to be wrapped.</param>
87     private ITextConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
88     {
89     }
90
91     /// <summary>Editable content property</summary>
92     /// <param name="kw_string">Content</param>
93     /// <returns><c>true</c> if setting the value succeeded, <c>false</c> otherwise</returns>
94     public bool SetTextContent(System.String kw_string) {
95                                  var _ret_var = Efl.Access.Editable.ITextConcrete.NativeMethods.efl_access_editable_text_content_set_ptr.Value.Delegate(this.NativeHandle,kw_string);
96         Eina.Error.RaiseIfUnhandledException();
97                         return _ret_var;
98  }
99     /// <summary>Insert text at given position</summary>
100     /// <param name="kw_string">String to be inserted</param>
101     /// <param name="position">Position to insert string</param>
102     /// <returns><c>true</c> if insert succeeded, <c>false</c> otherwise</returns>
103     public bool Insert(System.String kw_string, int position) {
104                                                          var _ret_var = Efl.Access.Editable.ITextConcrete.NativeMethods.efl_access_editable_text_insert_ptr.Value.Delegate(this.NativeHandle,kw_string, position);
105         Eina.Error.RaiseIfUnhandledException();
106                                         return _ret_var;
107  }
108     /// <summary>Copy text between start and end parameter</summary>
109     /// <param name="start">Start position to copy</param>
110     /// <param name="end">End position to copy</param>
111     /// <returns><c>true</c> if copy succeeded, <c>false</c> otherwise</returns>
112     public bool Copy(int start, int end) {
113                                                          var _ret_var = Efl.Access.Editable.ITextConcrete.NativeMethods.efl_access_editable_text_copy_ptr.Value.Delegate(this.NativeHandle,start, end);
114         Eina.Error.RaiseIfUnhandledException();
115                                         return _ret_var;
116  }
117     /// <summary>Cut text between start and end parameter</summary>
118     /// <param name="start">Start position to cut</param>
119     /// <param name="end">End position to cut</param>
120     /// <returns><c>true</c> if cut succeeded, <c>false</c> otherwise</returns>
121     public bool Cut(int start, int end) {
122                                                          var _ret_var = Efl.Access.Editable.ITextConcrete.NativeMethods.efl_access_editable_text_cut_ptr.Value.Delegate(this.NativeHandle,start, end);
123         Eina.Error.RaiseIfUnhandledException();
124                                         return _ret_var;
125  }
126     /// <summary>Delete text between start and end parameter</summary>
127     /// <param name="start">Start position to delete</param>
128     /// <param name="end">End position to delete</param>
129     /// <returns><c>true</c> if delete succeeded, <c>false</c> otherwise</returns>
130     public bool Delete(int start, int end) {
131                                                          var _ret_var = Efl.Access.Editable.ITextConcrete.NativeMethods.efl_access_editable_text_delete_ptr.Value.Delegate(this.NativeHandle,start, end);
132         Eina.Error.RaiseIfUnhandledException();
133                                         return _ret_var;
134  }
135     /// <summary>Paste text at given position</summary>
136     /// <param name="position">Position to insert text</param>
137     /// <returns><c>true</c> if paste succeeded, <c>false</c> otherwise</returns>
138     public bool Paste(int position) {
139                                  var _ret_var = Efl.Access.Editable.ITextConcrete.NativeMethods.efl_access_editable_text_paste_ptr.Value.Delegate(this.NativeHandle,position);
140         Eina.Error.RaiseIfUnhandledException();
141                         return _ret_var;
142  }
143     /// <summary>Editable content property</summary>
144     /// <value>Content</value>
145     public System.String TextContent {
146         set { SetTextContent(value); }
147     }
148     private static IntPtr GetEflClassStatic()
149     {
150         return Efl.Access.Editable.ITextConcrete.efl_access_editable_text_interface_get();
151     }
152     /// <summary>Wrapper for native methods and virtual method delegates.
153     /// For internal use by generated code only.</summary>
154     public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
155     {
156         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Elementary);
157         /// <summary>Gets the list of Eo operations to override.</summary>
158         /// <returns>The list of Eo operations to be overload.</returns>
159         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
160         {
161             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
162             var methods = Efl.Eo.Globals.GetUserMethods(type);
163
164             if (efl_access_editable_text_content_set_static_delegate == null)
165             {
166                 efl_access_editable_text_content_set_static_delegate = new efl_access_editable_text_content_set_delegate(text_content_set);
167             }
168
169             if (methods.FirstOrDefault(m => m.Name == "SetTextContent") != null)
170             {
171                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_access_editable_text_content_set"), func = Marshal.GetFunctionPointerForDelegate(efl_access_editable_text_content_set_static_delegate) });
172             }
173
174             if (efl_access_editable_text_insert_static_delegate == null)
175             {
176                 efl_access_editable_text_insert_static_delegate = new efl_access_editable_text_insert_delegate(insert);
177             }
178
179             if (methods.FirstOrDefault(m => m.Name == "Insert") != null)
180             {
181                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_access_editable_text_insert"), func = Marshal.GetFunctionPointerForDelegate(efl_access_editable_text_insert_static_delegate) });
182             }
183
184             if (efl_access_editable_text_copy_static_delegate == null)
185             {
186                 efl_access_editable_text_copy_static_delegate = new efl_access_editable_text_copy_delegate(copy);
187             }
188
189             if (methods.FirstOrDefault(m => m.Name == "Copy") != null)
190             {
191                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_access_editable_text_copy"), func = Marshal.GetFunctionPointerForDelegate(efl_access_editable_text_copy_static_delegate) });
192             }
193
194             if (efl_access_editable_text_cut_static_delegate == null)
195             {
196                 efl_access_editable_text_cut_static_delegate = new efl_access_editable_text_cut_delegate(cut);
197             }
198
199             if (methods.FirstOrDefault(m => m.Name == "Cut") != null)
200             {
201                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_access_editable_text_cut"), func = Marshal.GetFunctionPointerForDelegate(efl_access_editable_text_cut_static_delegate) });
202             }
203
204             if (efl_access_editable_text_delete_static_delegate == null)
205             {
206                 efl_access_editable_text_delete_static_delegate = new efl_access_editable_text_delete_delegate(kw_delete);
207             }
208
209             if (methods.FirstOrDefault(m => m.Name == "Delete") != null)
210             {
211                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_access_editable_text_delete"), func = Marshal.GetFunctionPointerForDelegate(efl_access_editable_text_delete_static_delegate) });
212             }
213
214             if (efl_access_editable_text_paste_static_delegate == null)
215             {
216                 efl_access_editable_text_paste_static_delegate = new efl_access_editable_text_paste_delegate(paste);
217             }
218
219             if (methods.FirstOrDefault(m => m.Name == "Paste") != null)
220             {
221                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_access_editable_text_paste"), func = Marshal.GetFunctionPointerForDelegate(efl_access_editable_text_paste_static_delegate) });
222             }
223
224             return descs;
225         }
226         /// <summary>Returns the Eo class for the native methods of this class.</summary>
227         /// <returns>The native class pointer.</returns>
228         public override IntPtr GetEflClass()
229         {
230             return Efl.Access.Editable.ITextConcrete.efl_access_editable_text_interface_get();
231         }
232
233         #pragma warning disable CA1707, CS1591, SA1300, SA1600
234
235         [return: MarshalAs(UnmanagedType.U1)]
236         private delegate bool efl_access_editable_text_content_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String kw_string);
237
238         [return: MarshalAs(UnmanagedType.U1)]
239         public delegate bool efl_access_editable_text_content_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String kw_string);
240
241         public static Efl.Eo.FunctionWrapper<efl_access_editable_text_content_set_api_delegate> efl_access_editable_text_content_set_ptr = new Efl.Eo.FunctionWrapper<efl_access_editable_text_content_set_api_delegate>(Module, "efl_access_editable_text_content_set");
242
243         private static bool text_content_set(System.IntPtr obj, System.IntPtr pd, System.String kw_string)
244         {
245             Eina.Log.Debug("function efl_access_editable_text_content_set was called");
246             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
247             if (ws != null)
248             {
249                                     bool _ret_var = default(bool);
250                 try
251                 {
252                     _ret_var = ((IText)ws.Target).SetTextContent(kw_string);
253                 }
254                 catch (Exception e)
255                 {
256                     Eina.Log.Warning($"Callback error: {e.ToString()}");
257                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
258                 }
259
260                         return _ret_var;
261
262             }
263             else
264             {
265                 return efl_access_editable_text_content_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), kw_string);
266             }
267         }
268
269         private static efl_access_editable_text_content_set_delegate efl_access_editable_text_content_set_static_delegate;
270
271         [return: MarshalAs(UnmanagedType.U1)]
272         private delegate bool efl_access_editable_text_insert_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String kw_string,  int position);
273
274         [return: MarshalAs(UnmanagedType.U1)]
275         public delegate bool efl_access_editable_text_insert_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String kw_string,  int position);
276
277         public static Efl.Eo.FunctionWrapper<efl_access_editable_text_insert_api_delegate> efl_access_editable_text_insert_ptr = new Efl.Eo.FunctionWrapper<efl_access_editable_text_insert_api_delegate>(Module, "efl_access_editable_text_insert");
278
279         private static bool insert(System.IntPtr obj, System.IntPtr pd, System.String kw_string, int position)
280         {
281             Eina.Log.Debug("function efl_access_editable_text_insert was called");
282             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
283             if (ws != null)
284             {
285                                                             bool _ret_var = default(bool);
286                 try
287                 {
288                     _ret_var = ((IText)ws.Target).Insert(kw_string, position);
289                 }
290                 catch (Exception e)
291                 {
292                     Eina.Log.Warning($"Callback error: {e.ToString()}");
293                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
294                 }
295
296                                         return _ret_var;
297
298             }
299             else
300             {
301                 return efl_access_editable_text_insert_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), kw_string, position);
302             }
303         }
304
305         private static efl_access_editable_text_insert_delegate efl_access_editable_text_insert_static_delegate;
306
307         [return: MarshalAs(UnmanagedType.U1)]
308         private delegate bool efl_access_editable_text_copy_delegate(System.IntPtr obj, System.IntPtr pd,  int start,  int end);
309
310         [return: MarshalAs(UnmanagedType.U1)]
311         public delegate bool efl_access_editable_text_copy_api_delegate(System.IntPtr obj,  int start,  int end);
312
313         public static Efl.Eo.FunctionWrapper<efl_access_editable_text_copy_api_delegate> efl_access_editable_text_copy_ptr = new Efl.Eo.FunctionWrapper<efl_access_editable_text_copy_api_delegate>(Module, "efl_access_editable_text_copy");
314
315         private static bool copy(System.IntPtr obj, System.IntPtr pd, int start, int end)
316         {
317             Eina.Log.Debug("function efl_access_editable_text_copy was called");
318             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
319             if (ws != null)
320             {
321                                                             bool _ret_var = default(bool);
322                 try
323                 {
324                     _ret_var = ((IText)ws.Target).Copy(start, end);
325                 }
326                 catch (Exception e)
327                 {
328                     Eina.Log.Warning($"Callback error: {e.ToString()}");
329                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
330                 }
331
332                                         return _ret_var;
333
334             }
335             else
336             {
337                 return efl_access_editable_text_copy_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), start, end);
338             }
339         }
340
341         private static efl_access_editable_text_copy_delegate efl_access_editable_text_copy_static_delegate;
342
343         [return: MarshalAs(UnmanagedType.U1)]
344         private delegate bool efl_access_editable_text_cut_delegate(System.IntPtr obj, System.IntPtr pd,  int start,  int end);
345
346         [return: MarshalAs(UnmanagedType.U1)]
347         public delegate bool efl_access_editable_text_cut_api_delegate(System.IntPtr obj,  int start,  int end);
348
349         public static Efl.Eo.FunctionWrapper<efl_access_editable_text_cut_api_delegate> efl_access_editable_text_cut_ptr = new Efl.Eo.FunctionWrapper<efl_access_editable_text_cut_api_delegate>(Module, "efl_access_editable_text_cut");
350
351         private static bool cut(System.IntPtr obj, System.IntPtr pd, int start, int end)
352         {
353             Eina.Log.Debug("function efl_access_editable_text_cut was called");
354             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
355             if (ws != null)
356             {
357                                                             bool _ret_var = default(bool);
358                 try
359                 {
360                     _ret_var = ((IText)ws.Target).Cut(start, end);
361                 }
362                 catch (Exception e)
363                 {
364                     Eina.Log.Warning($"Callback error: {e.ToString()}");
365                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
366                 }
367
368                                         return _ret_var;
369
370             }
371             else
372             {
373                 return efl_access_editable_text_cut_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), start, end);
374             }
375         }
376
377         private static efl_access_editable_text_cut_delegate efl_access_editable_text_cut_static_delegate;
378
379         [return: MarshalAs(UnmanagedType.U1)]
380         private delegate bool efl_access_editable_text_delete_delegate(System.IntPtr obj, System.IntPtr pd,  int start,  int end);
381
382         [return: MarshalAs(UnmanagedType.U1)]
383         public delegate bool efl_access_editable_text_delete_api_delegate(System.IntPtr obj,  int start,  int end);
384
385         public static Efl.Eo.FunctionWrapper<efl_access_editable_text_delete_api_delegate> efl_access_editable_text_delete_ptr = new Efl.Eo.FunctionWrapper<efl_access_editable_text_delete_api_delegate>(Module, "efl_access_editable_text_delete");
386
387         private static bool kw_delete(System.IntPtr obj, System.IntPtr pd, int start, int end)
388         {
389             Eina.Log.Debug("function efl_access_editable_text_delete was called");
390             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
391             if (ws != null)
392             {
393                                                             bool _ret_var = default(bool);
394                 try
395                 {
396                     _ret_var = ((IText)ws.Target).Delete(start, end);
397                 }
398                 catch (Exception e)
399                 {
400                     Eina.Log.Warning($"Callback error: {e.ToString()}");
401                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
402                 }
403
404                                         return _ret_var;
405
406             }
407             else
408             {
409                 return efl_access_editable_text_delete_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), start, end);
410             }
411         }
412
413         private static efl_access_editable_text_delete_delegate efl_access_editable_text_delete_static_delegate;
414
415         [return: MarshalAs(UnmanagedType.U1)]
416         private delegate bool efl_access_editable_text_paste_delegate(System.IntPtr obj, System.IntPtr pd,  int position);
417
418         [return: MarshalAs(UnmanagedType.U1)]
419         public delegate bool efl_access_editable_text_paste_api_delegate(System.IntPtr obj,  int position);
420
421         public static Efl.Eo.FunctionWrapper<efl_access_editable_text_paste_api_delegate> efl_access_editable_text_paste_ptr = new Efl.Eo.FunctionWrapper<efl_access_editable_text_paste_api_delegate>(Module, "efl_access_editable_text_paste");
422
423         private static bool paste(System.IntPtr obj, System.IntPtr pd, int position)
424         {
425             Eina.Log.Debug("function efl_access_editable_text_paste was called");
426             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
427             if (ws != null)
428             {
429                                     bool _ret_var = default(bool);
430                 try
431                 {
432                     _ret_var = ((IText)ws.Target).Paste(position);
433                 }
434                 catch (Exception e)
435                 {
436                     Eina.Log.Warning($"Callback error: {e.ToString()}");
437                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
438                 }
439
440                         return _ret_var;
441
442             }
443             else
444             {
445                 return efl_access_editable_text_paste_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), position);
446             }
447         }
448
449         private static efl_access_editable_text_paste_delegate efl_access_editable_text_paste_static_delegate;
450
451         #pragma warning restore CA1707, CS1591, SA1300, SA1600
452
453 }
454 }
455 }
456
457 }
458
459 }
460