1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.Threading;
7 using System.ComponentModel;
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
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 {
54 /// <summary>Elementary editable text interface</summary>
55 sealed public class ITextConcrete :
60 ///<summary>Pointer to the native class description.</summary>
61 public override System.IntPtr NativeClass
65 if (((object)this).GetType() == typeof(ITextConcrete))
67 return GetEflClassStatic();
71 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
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)
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)
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();
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();
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();
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();
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();
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();
143 /// <summary>Editable content property</summary>
144 /// <value>Content</value>
145 public System.String TextContent {
146 set { SetTextContent(value); }
148 private static IntPtr GetEflClassStatic()
150 return Efl.Access.Editable.ITextConcrete.efl_access_editable_text_interface_get();
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
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)
161 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
162 var methods = Efl.Eo.Globals.GetUserMethods(type);
164 if (efl_access_editable_text_content_set_static_delegate == null)
166 efl_access_editable_text_content_set_static_delegate = new efl_access_editable_text_content_set_delegate(text_content_set);
169 if (methods.FirstOrDefault(m => m.Name == "SetTextContent") != null)
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) });
174 if (efl_access_editable_text_insert_static_delegate == null)
176 efl_access_editable_text_insert_static_delegate = new efl_access_editable_text_insert_delegate(insert);
179 if (methods.FirstOrDefault(m => m.Name == "Insert") != null)
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) });
184 if (efl_access_editable_text_copy_static_delegate == null)
186 efl_access_editable_text_copy_static_delegate = new efl_access_editable_text_copy_delegate(copy);
189 if (methods.FirstOrDefault(m => m.Name == "Copy") != null)
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) });
194 if (efl_access_editable_text_cut_static_delegate == null)
196 efl_access_editable_text_cut_static_delegate = new efl_access_editable_text_cut_delegate(cut);
199 if (methods.FirstOrDefault(m => m.Name == "Cut") != null)
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) });
204 if (efl_access_editable_text_delete_static_delegate == null)
206 efl_access_editable_text_delete_static_delegate = new efl_access_editable_text_delete_delegate(kw_delete);
209 if (methods.FirstOrDefault(m => m.Name == "Delete") != null)
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) });
214 if (efl_access_editable_text_paste_static_delegate == null)
216 efl_access_editable_text_paste_static_delegate = new efl_access_editable_text_paste_delegate(paste);
219 if (methods.FirstOrDefault(m => m.Name == "Paste") != null)
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) });
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()
230 return Efl.Access.Editable.ITextConcrete.efl_access_editable_text_interface_get();
233 #pragma warning disable CA1707, CS1591, SA1300, SA1600
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);
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);
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");
243 private static bool text_content_set(System.IntPtr obj, System.IntPtr pd, System.String kw_string)
245 Eina.Log.Debug("function efl_access_editable_text_content_set was called");
246 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
249 bool _ret_var = default(bool);
252 _ret_var = ((IText)ws.Target).SetTextContent(kw_string);
256 Eina.Log.Warning($"Callback error: {e.ToString()}");
257 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
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);
269 private static efl_access_editable_text_content_set_delegate efl_access_editable_text_content_set_static_delegate;
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);
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);
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");
279 private static bool insert(System.IntPtr obj, System.IntPtr pd, System.String kw_string, int position)
281 Eina.Log.Debug("function efl_access_editable_text_insert was called");
282 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
285 bool _ret_var = default(bool);
288 _ret_var = ((IText)ws.Target).Insert(kw_string, position);
292 Eina.Log.Warning($"Callback error: {e.ToString()}");
293 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
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);
305 private static efl_access_editable_text_insert_delegate efl_access_editable_text_insert_static_delegate;
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);
310 [return: MarshalAs(UnmanagedType.U1)]
311 public delegate bool efl_access_editable_text_copy_api_delegate(System.IntPtr obj, int start, int end);
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");
315 private static bool copy(System.IntPtr obj, System.IntPtr pd, int start, int end)
317 Eina.Log.Debug("function efl_access_editable_text_copy was called");
318 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
321 bool _ret_var = default(bool);
324 _ret_var = ((IText)ws.Target).Copy(start, end);
328 Eina.Log.Warning($"Callback error: {e.ToString()}");
329 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
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);
341 private static efl_access_editable_text_copy_delegate efl_access_editable_text_copy_static_delegate;
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);
346 [return: MarshalAs(UnmanagedType.U1)]
347 public delegate bool efl_access_editable_text_cut_api_delegate(System.IntPtr obj, int start, int end);
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");
351 private static bool cut(System.IntPtr obj, System.IntPtr pd, int start, int end)
353 Eina.Log.Debug("function efl_access_editable_text_cut was called");
354 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
357 bool _ret_var = default(bool);
360 _ret_var = ((IText)ws.Target).Cut(start, end);
364 Eina.Log.Warning($"Callback error: {e.ToString()}");
365 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
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);
377 private static efl_access_editable_text_cut_delegate efl_access_editable_text_cut_static_delegate;
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);
382 [return: MarshalAs(UnmanagedType.U1)]
383 public delegate bool efl_access_editable_text_delete_api_delegate(System.IntPtr obj, int start, int end);
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");
387 private static bool kw_delete(System.IntPtr obj, System.IntPtr pd, int start, int end)
389 Eina.Log.Debug("function efl_access_editable_text_delete was called");
390 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
393 bool _ret_var = default(bool);
396 _ret_var = ((IText)ws.Target).Delete(start, end);
400 Eina.Log.Warning($"Callback error: {e.ToString()}");
401 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
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);
413 private static efl_access_editable_text_delete_delegate efl_access_editable_text_delete_static_delegate;
415 [return: MarshalAs(UnmanagedType.U1)]
416 private delegate bool efl_access_editable_text_paste_delegate(System.IntPtr obj, System.IntPtr pd, int position);
418 [return: MarshalAs(UnmanagedType.U1)]
419 public delegate bool efl_access_editable_text_paste_api_delegate(System.IntPtr obj, int position);
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");
423 private static bool paste(System.IntPtr obj, System.IntPtr pd, int position)
425 Eina.Log.Debug("function efl_access_editable_text_paste was called");
426 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
429 bool _ret_var = default(bool);
432 _ret_var = ((IText)ws.Target).Paste(position);
436 Eina.Log.Warning($"Callback error: {e.ToString()}");
437 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
445 return efl_access_editable_text_paste_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), position);
449 private static efl_access_editable_text_paste_delegate efl_access_editable_text_paste_static_delegate;
451 #pragma warning restore CA1707, CS1591, SA1300, SA1600