1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.ComponentModel;
7 namespace Efl { namespace Access { namespace Editable {
8 /// <summary>Elementary editable text interface</summary>
10 public interface Text :
11 Efl.Eo.IWrapper, IDisposable
13 /// <summary>Editable content property</summary>
14 /// <param name="kw_string">Content</param>
15 /// <returns><c>true</c> if setting the value succeeded, <c>false</c> otherwise</returns>
16 bool SetTextContent( System.String kw_string);
17 /// <summary>Insert text at given position</summary>
18 /// <param name="kw_string">String to be inserted</param>
19 /// <param name="position">Position to insert string</param>
20 /// <returns><c>true</c> if insert succeeded, <c>false</c> otherwise</returns>
21 bool Insert( System.String kw_string, int position);
22 /// <summary>Copy text between start and end parameter</summary>
23 /// <param name="start">Start position to copy</param>
24 /// <param name="end">End position to copy</param>
25 /// <returns><c>true</c> if copy succeeded, <c>false</c> otherwise</returns>
26 bool Copy( int start, int end);
27 /// <summary>Cut text between start and end parameter</summary>
28 /// <param name="start">Start position to cut</param>
29 /// <param name="end">End position to cut</param>
30 /// <returns><c>true</c> if cut succeeded, <c>false</c> otherwise</returns>
31 bool Cut( int start, int end);
32 /// <summary>Delete text between start and end parameter</summary>
33 /// <param name="start">Start position to delete</param>
34 /// <param name="end">End position to delete</param>
35 /// <returns><c>true</c> if delete succeeded, <c>false</c> otherwise</returns>
36 bool Delete( int start, int end);
37 /// <summary>Paste text at given position</summary>
38 /// <param name="position">Position to insert text</param>
39 /// <returns><c>true</c> if paste succeeded, <c>false</c> otherwise</returns>
40 bool Paste( int position);
41 /// <summary>Editable content property</summary>
42 /// <value>Content</value>
43 System.String TextContent {
47 /// <summary>Elementary editable text interface</summary>
48 sealed public class TextConcrete :
53 ///<summary>Pointer to the native class description.</summary>
54 public System.IntPtr NativeClass {
56 if (((object)this).GetType() == typeof (TextConcrete))
57 return Efl.Access.Editable.TextNativeInherit.GetEflClassStatic();
59 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
62 private System.IntPtr handle;
63 ///<summary>Pointer to the native instance.</summary>
64 public System.IntPtr NativeHandle {
65 get { return handle; }
67 [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
68 efl_access_editable_text_interface_get();
69 ///<summary>Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
70 public TextConcrete(System.IntPtr raw)
73 register_event_proxies();
75 ///<summary>Destructor.</summary>
80 ///<summary>Releases the underlying native instance.</summary>
81 void Dispose(bool disposing)
83 if (handle != System.IntPtr.Zero) {
84 Efl.Eo.Globals.efl_unref(handle);
85 handle = System.IntPtr.Zero;
88 ///<summary>Releases the underlying native instance.</summary>
92 GC.SuppressFinalize(this);
94 ///<summary>Casts obj into an instance of this type.</summary>
95 public static TextConcrete static_cast(Efl.Object obj)
98 throw new System.ArgumentNullException("obj");
99 return new TextConcrete(obj.NativeHandle);
101 ///<summary>Verifies if the given object is equal to this one.</summary>
102 public override bool Equals(object obj)
104 var other = obj as Efl.Object;
107 return this.NativeHandle == other.NativeHandle;
109 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
110 public override int GetHashCode()
112 return this.NativeHandle.ToInt32();
114 ///<summary>Turns the native pointer into a string representation.</summary>
115 public override String ToString()
117 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
119 void register_event_proxies()
122 /// <summary>Editable content property</summary>
123 /// <param name="kw_string">Content</param>
124 /// <returns><c>true</c> if setting the value succeeded, <c>false</c> otherwise</returns>
125 public bool SetTextContent( System.String kw_string) {
126 var _ret_var = Efl.Access.Editable.TextNativeInherit.efl_access_editable_text_content_set_ptr.Value.Delegate(this.NativeHandle, kw_string);
127 Eina.Error.RaiseIfUnhandledException();
130 /// <summary>Insert text at given position</summary>
131 /// <param name="kw_string">String to be inserted</param>
132 /// <param name="position">Position to insert string</param>
133 /// <returns><c>true</c> if insert succeeded, <c>false</c> otherwise</returns>
134 public bool Insert( System.String kw_string, int position) {
135 var _ret_var = Efl.Access.Editable.TextNativeInherit.efl_access_editable_text_insert_ptr.Value.Delegate(this.NativeHandle, kw_string, position);
136 Eina.Error.RaiseIfUnhandledException();
139 /// <summary>Copy text between start and end parameter</summary>
140 /// <param name="start">Start position to copy</param>
141 /// <param name="end">End position to copy</param>
142 /// <returns><c>true</c> if copy succeeded, <c>false</c> otherwise</returns>
143 public bool Copy( int start, int end) {
144 var _ret_var = Efl.Access.Editable.TextNativeInherit.efl_access_editable_text_copy_ptr.Value.Delegate(this.NativeHandle, start, end);
145 Eina.Error.RaiseIfUnhandledException();
148 /// <summary>Cut text between start and end parameter</summary>
149 /// <param name="start">Start position to cut</param>
150 /// <param name="end">End position to cut</param>
151 /// <returns><c>true</c> if cut succeeded, <c>false</c> otherwise</returns>
152 public bool Cut( int start, int end) {
153 var _ret_var = Efl.Access.Editable.TextNativeInherit.efl_access_editable_text_cut_ptr.Value.Delegate(this.NativeHandle, start, end);
154 Eina.Error.RaiseIfUnhandledException();
157 /// <summary>Delete text between start and end parameter</summary>
158 /// <param name="start">Start position to delete</param>
159 /// <param name="end">End position to delete</param>
160 /// <returns><c>true</c> if delete succeeded, <c>false</c> otherwise</returns>
161 public bool Delete( int start, int end) {
162 var _ret_var = Efl.Access.Editable.TextNativeInherit.efl_access_editable_text_delete_ptr.Value.Delegate(this.NativeHandle, start, end);
163 Eina.Error.RaiseIfUnhandledException();
166 /// <summary>Paste text at given position</summary>
167 /// <param name="position">Position to insert text</param>
168 /// <returns><c>true</c> if paste succeeded, <c>false</c> otherwise</returns>
169 public bool Paste( int position) {
170 var _ret_var = Efl.Access.Editable.TextNativeInherit.efl_access_editable_text_paste_ptr.Value.Delegate(this.NativeHandle, position);
171 Eina.Error.RaiseIfUnhandledException();
174 /// <summary>Editable content property</summary>
175 /// <value>Content</value>
176 public System.String TextContent {
177 set { SetTextContent( value); }
180 public class TextNativeInherit : Efl.Eo.NativeClass{
181 public static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Elementary);
182 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
184 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
185 if (efl_access_editable_text_content_set_static_delegate == null)
186 efl_access_editable_text_content_set_static_delegate = new efl_access_editable_text_content_set_delegate(text_content_set);
187 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)});
188 if (efl_access_editable_text_insert_static_delegate == null)
189 efl_access_editable_text_insert_static_delegate = new efl_access_editable_text_insert_delegate(insert);
190 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)});
191 if (efl_access_editable_text_copy_static_delegate == null)
192 efl_access_editable_text_copy_static_delegate = new efl_access_editable_text_copy_delegate(copy);
193 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)
195 efl_access_editable_text_cut_static_delegate = new efl_access_editable_text_cut_delegate(cut);
196 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)});
197 if (efl_access_editable_text_delete_static_delegate == null)
198 efl_access_editable_text_delete_static_delegate = new efl_access_editable_text_delete_delegate(kw_delete);
199 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)});
200 if (efl_access_editable_text_paste_static_delegate == null)
201 efl_access_editable_text_paste_static_delegate = new efl_access_editable_text_paste_delegate(paste);
202 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)});
205 public override IntPtr GetEflClass()
207 return Efl.Access.Editable.TextConcrete.efl_access_editable_text_interface_get();
209 public static IntPtr GetEflClassStatic()
211 return Efl.Access.Editable.TextConcrete.efl_access_editable_text_interface_get();
215 [return: MarshalAs(UnmanagedType.U1)] 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);
218 [return: MarshalAs(UnmanagedType.U1)] 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);
219 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");
220 private static bool text_content_set(System.IntPtr obj, System.IntPtr pd, System.String kw_string)
222 Eina.Log.Debug("function efl_access_editable_text_content_set was called");
223 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
224 if(wrapper != null) {
225 bool _ret_var = default(bool);
227 _ret_var = ((Text)wrapper).SetTextContent( kw_string);
228 } catch (Exception e) {
229 Eina.Log.Warning($"Callback error: {e.ToString()}");
230 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
234 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);
237 private static efl_access_editable_text_content_set_delegate efl_access_editable_text_content_set_static_delegate;
240 [return: MarshalAs(UnmanagedType.U1)] 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);
243 [return: MarshalAs(UnmanagedType.U1)] 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);
244 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");
245 private static bool insert(System.IntPtr obj, System.IntPtr pd, System.String kw_string, int position)
247 Eina.Log.Debug("function efl_access_editable_text_insert was called");
248 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
249 if(wrapper != null) {
250 bool _ret_var = default(bool);
252 _ret_var = ((Text)wrapper).Insert( kw_string, position);
253 } catch (Exception e) {
254 Eina.Log.Warning($"Callback error: {e.ToString()}");
255 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
259 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);
262 private static efl_access_editable_text_insert_delegate efl_access_editable_text_insert_static_delegate;
265 [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_access_editable_text_copy_delegate(System.IntPtr obj, System.IntPtr pd, int start, int end);
268 [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_access_editable_text_copy_api_delegate(System.IntPtr obj, int start, int end);
269 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");
270 private static bool copy(System.IntPtr obj, System.IntPtr pd, int start, int end)
272 Eina.Log.Debug("function efl_access_editable_text_copy was called");
273 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
274 if(wrapper != null) {
275 bool _ret_var = default(bool);
277 _ret_var = ((Text)wrapper).Copy( start, end);
278 } catch (Exception e) {
279 Eina.Log.Warning($"Callback error: {e.ToString()}");
280 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
284 return efl_access_editable_text_copy_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), start, end);
287 private static efl_access_editable_text_copy_delegate efl_access_editable_text_copy_static_delegate;
290 [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_access_editable_text_cut_delegate(System.IntPtr obj, System.IntPtr pd, int start, int end);
293 [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_access_editable_text_cut_api_delegate(System.IntPtr obj, int start, int end);
294 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");
295 private static bool cut(System.IntPtr obj, System.IntPtr pd, int start, int end)
297 Eina.Log.Debug("function efl_access_editable_text_cut was called");
298 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
299 if(wrapper != null) {
300 bool _ret_var = default(bool);
302 _ret_var = ((Text)wrapper).Cut( start, end);
303 } catch (Exception e) {
304 Eina.Log.Warning($"Callback error: {e.ToString()}");
305 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
309 return efl_access_editable_text_cut_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), start, end);
312 private static efl_access_editable_text_cut_delegate efl_access_editable_text_cut_static_delegate;
315 [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_access_editable_text_delete_delegate(System.IntPtr obj, System.IntPtr pd, int start, int end);
318 [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_access_editable_text_delete_api_delegate(System.IntPtr obj, int start, int end);
319 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");
320 private static bool kw_delete(System.IntPtr obj, System.IntPtr pd, int start, int end)
322 Eina.Log.Debug("function efl_access_editable_text_delete was called");
323 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
324 if(wrapper != null) {
325 bool _ret_var = default(bool);
327 _ret_var = ((Text)wrapper).Delete( start, end);
328 } catch (Exception e) {
329 Eina.Log.Warning($"Callback error: {e.ToString()}");
330 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
334 return efl_access_editable_text_delete_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), start, end);
337 private static efl_access_editable_text_delete_delegate efl_access_editable_text_delete_static_delegate;
340 [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_access_editable_text_paste_delegate(System.IntPtr obj, System.IntPtr pd, int position);
343 [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_access_editable_text_paste_api_delegate(System.IntPtr obj, int position);
344 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");
345 private static bool paste(System.IntPtr obj, System.IntPtr pd, int position)
347 Eina.Log.Debug("function efl_access_editable_text_paste was called");
348 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
349 if(wrapper != null) {
350 bool _ret_var = default(bool);
352 _ret_var = ((Text)wrapper).Paste( position);
353 } catch (Exception e) {
354 Eina.Log.Warning($"Callback error: {e.ToString()}");
355 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
359 return efl_access_editable_text_paste_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), position);
362 private static efl_access_editable_text_paste_delegate efl_access_editable_text_paste_static_delegate;