#define EFL_BETA
#pragma warning disable CS1591
using System;
using System.Runtime.InteropServices;
using System.Collections.Generic;
using System.Linq;
using System.Threading;
using System.ComponentModel;
namespace Efl {
namespace Access {
namespace Editable {
/// Elementary editable text interface
/// This is a BETA class. It can be modified or removed in the future. Do not use it for product development.
[Efl.Access.Editable.ITextConcrete.NativeMethods]
[Efl.Eo.BindingEntity]
public interface IText :
Efl.Eo.IWrapper, IDisposable
{
/// Editable content property
/// Content
/// true if setting the value succeeded, false otherwise
bool SetTextContent(System.String kw_string);
/// Insert text at given position
/// String to be inserted
/// Position to insert string
/// true if insert succeeded, false otherwise
bool Insert(System.String kw_string, int position);
/// Copy text between start and end parameter
/// Start position to copy
/// End position to copy
/// true if copy succeeded, false otherwise
bool Copy(int start, int end);
/// Cut text between start and end parameter
/// Start position to cut
/// End position to cut
/// true if cut succeeded, false otherwise
bool Cut(int start, int end);
/// Delete text between start and end parameter
/// Start position to delete
/// End position to delete
/// true if delete succeeded, false otherwise
bool Delete(int start, int end);
/// Paste text at given position
/// Position to insert text
/// true if paste succeeded, false otherwise
bool Paste(int position);
/// Editable content property
/// Content
System.String TextContent {
set;
}
}
/// Elementary editable text interface
/// This is a BETA class. It can be modified or removed in the future. Do not use it for product development.
sealed public class ITextConcrete :
Efl.Eo.EoWrapper
, IText
{
/// Pointer to the native class description.
public override System.IntPtr NativeClass
{
get
{
if (((object)this).GetType() == typeof(ITextConcrete))
{
return GetEflClassStatic();
}
else
{
return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
}
}
}
/// Subclasses should override this constructor if they are expected to be instantiated from native code.
/// Do not call this constructor directly.
/// Tag struct storing the native handle of the object being constructed.
private ITextConcrete(ConstructingHandle ch) : base(ch)
{
}
[System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
efl_access_editable_text_interface_get();
/// Initializes a new instance of the class.
/// Internal usage: This is used when interacting with C code and should not be used directly.
/// The native pointer to be wrapped.
private ITextConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
{
}
/// Editable content property
/// Content
/// true if setting the value succeeded, false otherwise
public bool SetTextContent(System.String kw_string) {
var _ret_var = Efl.Access.Editable.ITextConcrete.NativeMethods.efl_access_editable_text_content_set_ptr.Value.Delegate(this.NativeHandle,kw_string);
Eina.Error.RaiseIfUnhandledException();
return _ret_var;
}
/// Insert text at given position
/// String to be inserted
/// Position to insert string
/// true if insert succeeded, false otherwise
public bool Insert(System.String kw_string, int position) {
var _ret_var = Efl.Access.Editable.ITextConcrete.NativeMethods.efl_access_editable_text_insert_ptr.Value.Delegate(this.NativeHandle,kw_string, position);
Eina.Error.RaiseIfUnhandledException();
return _ret_var;
}
/// Copy text between start and end parameter
/// Start position to copy
/// End position to copy
/// true if copy succeeded, false otherwise
public bool Copy(int start, int end) {
var _ret_var = Efl.Access.Editable.ITextConcrete.NativeMethods.efl_access_editable_text_copy_ptr.Value.Delegate(this.NativeHandle,start, end);
Eina.Error.RaiseIfUnhandledException();
return _ret_var;
}
/// Cut text between start and end parameter
/// Start position to cut
/// End position to cut
/// true if cut succeeded, false otherwise
public bool Cut(int start, int end) {
var _ret_var = Efl.Access.Editable.ITextConcrete.NativeMethods.efl_access_editable_text_cut_ptr.Value.Delegate(this.NativeHandle,start, end);
Eina.Error.RaiseIfUnhandledException();
return _ret_var;
}
/// Delete text between start and end parameter
/// Start position to delete
/// End position to delete
/// true if delete succeeded, false otherwise
public bool Delete(int start, int end) {
var _ret_var = Efl.Access.Editable.ITextConcrete.NativeMethods.efl_access_editable_text_delete_ptr.Value.Delegate(this.NativeHandle,start, end);
Eina.Error.RaiseIfUnhandledException();
return _ret_var;
}
/// Paste text at given position
/// Position to insert text
/// true if paste succeeded, false otherwise
public bool Paste(int position) {
var _ret_var = Efl.Access.Editable.ITextConcrete.NativeMethods.efl_access_editable_text_paste_ptr.Value.Delegate(this.NativeHandle,position);
Eina.Error.RaiseIfUnhandledException();
return _ret_var;
}
/// Editable content property
/// Content
public System.String TextContent {
set { SetTextContent(value); }
}
private static IntPtr GetEflClassStatic()
{
return Efl.Access.Editable.ITextConcrete.efl_access_editable_text_interface_get();
}
/// Wrapper for native methods and virtual method delegates.
/// For internal use by generated code only.
public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
{
private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Elementary);
/// Gets the list of Eo operations to override.
/// The list of Eo operations to be overload.
public override System.Collections.Generic.List GetEoOps(System.Type type)
{
var descs = new System.Collections.Generic.List();
var methods = Efl.Eo.Globals.GetUserMethods(type);
if (efl_access_editable_text_content_set_static_delegate == null)
{
efl_access_editable_text_content_set_static_delegate = new efl_access_editable_text_content_set_delegate(text_content_set);
}
if (methods.FirstOrDefault(m => m.Name == "SetTextContent") != null)
{
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) });
}
if (efl_access_editable_text_insert_static_delegate == null)
{
efl_access_editable_text_insert_static_delegate = new efl_access_editable_text_insert_delegate(insert);
}
if (methods.FirstOrDefault(m => m.Name == "Insert") != null)
{
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) });
}
if (efl_access_editable_text_copy_static_delegate == null)
{
efl_access_editable_text_copy_static_delegate = new efl_access_editable_text_copy_delegate(copy);
}
if (methods.FirstOrDefault(m => m.Name == "Copy") != null)
{
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) });
}
if (efl_access_editable_text_cut_static_delegate == null)
{
efl_access_editable_text_cut_static_delegate = new efl_access_editable_text_cut_delegate(cut);
}
if (methods.FirstOrDefault(m => m.Name == "Cut") != null)
{
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) });
}
if (efl_access_editable_text_delete_static_delegate == null)
{
efl_access_editable_text_delete_static_delegate = new efl_access_editable_text_delete_delegate(kw_delete);
}
if (methods.FirstOrDefault(m => m.Name == "Delete") != null)
{
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) });
}
if (efl_access_editable_text_paste_static_delegate == null)
{
efl_access_editable_text_paste_static_delegate = new efl_access_editable_text_paste_delegate(paste);
}
if (methods.FirstOrDefault(m => m.Name == "Paste") != null)
{
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) });
}
return descs;
}
/// Returns the Eo class for the native methods of this class.
/// The native class pointer.
public override IntPtr GetEflClass()
{
return Efl.Access.Editable.ITextConcrete.efl_access_editable_text_interface_get();
}
#pragma warning disable CA1707, CS1591, SA1300, SA1600
[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);
[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);
public static Efl.Eo.FunctionWrapper efl_access_editable_text_content_set_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_access_editable_text_content_set");
private static bool text_content_set(System.IntPtr obj, System.IntPtr pd, System.String kw_string)
{
Eina.Log.Debug("function efl_access_editable_text_content_set was called");
var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
if (ws != null)
{
bool _ret_var = default(bool);
try
{
_ret_var = ((IText)ws.Target).SetTextContent(kw_string);
}
catch (Exception e)
{
Eina.Log.Warning($"Callback error: {e.ToString()}");
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
return _ret_var;
}
else
{
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);
}
}
private static efl_access_editable_text_content_set_delegate efl_access_editable_text_content_set_static_delegate;
[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);
[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);
public static Efl.Eo.FunctionWrapper efl_access_editable_text_insert_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_access_editable_text_insert");
private static bool insert(System.IntPtr obj, System.IntPtr pd, System.String kw_string, int position)
{
Eina.Log.Debug("function efl_access_editable_text_insert was called");
var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
if (ws != null)
{
bool _ret_var = default(bool);
try
{
_ret_var = ((IText)ws.Target).Insert(kw_string, position);
}
catch (Exception e)
{
Eina.Log.Warning($"Callback error: {e.ToString()}");
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
return _ret_var;
}
else
{
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);
}
}
private static efl_access_editable_text_insert_delegate efl_access_editable_text_insert_static_delegate;
[return: MarshalAs(UnmanagedType.U1)]
private delegate bool efl_access_editable_text_copy_delegate(System.IntPtr obj, System.IntPtr pd, int start, int end);
[return: MarshalAs(UnmanagedType.U1)]
public delegate bool efl_access_editable_text_copy_api_delegate(System.IntPtr obj, int start, int end);
public static Efl.Eo.FunctionWrapper efl_access_editable_text_copy_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_access_editable_text_copy");
private static bool copy(System.IntPtr obj, System.IntPtr pd, int start, int end)
{
Eina.Log.Debug("function efl_access_editable_text_copy was called");
var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
if (ws != null)
{
bool _ret_var = default(bool);
try
{
_ret_var = ((IText)ws.Target).Copy(start, end);
}
catch (Exception e)
{
Eina.Log.Warning($"Callback error: {e.ToString()}");
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
return _ret_var;
}
else
{
return efl_access_editable_text_copy_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), start, end);
}
}
private static efl_access_editable_text_copy_delegate efl_access_editable_text_copy_static_delegate;
[return: MarshalAs(UnmanagedType.U1)]
private delegate bool efl_access_editable_text_cut_delegate(System.IntPtr obj, System.IntPtr pd, int start, int end);
[return: MarshalAs(UnmanagedType.U1)]
public delegate bool efl_access_editable_text_cut_api_delegate(System.IntPtr obj, int start, int end);
public static Efl.Eo.FunctionWrapper efl_access_editable_text_cut_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_access_editable_text_cut");
private static bool cut(System.IntPtr obj, System.IntPtr pd, int start, int end)
{
Eina.Log.Debug("function efl_access_editable_text_cut was called");
var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
if (ws != null)
{
bool _ret_var = default(bool);
try
{
_ret_var = ((IText)ws.Target).Cut(start, end);
}
catch (Exception e)
{
Eina.Log.Warning($"Callback error: {e.ToString()}");
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
return _ret_var;
}
else
{
return efl_access_editable_text_cut_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), start, end);
}
}
private static efl_access_editable_text_cut_delegate efl_access_editable_text_cut_static_delegate;
[return: MarshalAs(UnmanagedType.U1)]
private delegate bool efl_access_editable_text_delete_delegate(System.IntPtr obj, System.IntPtr pd, int start, int end);
[return: MarshalAs(UnmanagedType.U1)]
public delegate bool efl_access_editable_text_delete_api_delegate(System.IntPtr obj, int start, int end);
public static Efl.Eo.FunctionWrapper efl_access_editable_text_delete_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_access_editable_text_delete");
private static bool kw_delete(System.IntPtr obj, System.IntPtr pd, int start, int end)
{
Eina.Log.Debug("function efl_access_editable_text_delete was called");
var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
if (ws != null)
{
bool _ret_var = default(bool);
try
{
_ret_var = ((IText)ws.Target).Delete(start, end);
}
catch (Exception e)
{
Eina.Log.Warning($"Callback error: {e.ToString()}");
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
return _ret_var;
}
else
{
return efl_access_editable_text_delete_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), start, end);
}
}
private static efl_access_editable_text_delete_delegate efl_access_editable_text_delete_static_delegate;
[return: MarshalAs(UnmanagedType.U1)]
private delegate bool efl_access_editable_text_paste_delegate(System.IntPtr obj, System.IntPtr pd, int position);
[return: MarshalAs(UnmanagedType.U1)]
public delegate bool efl_access_editable_text_paste_api_delegate(System.IntPtr obj, int position);
public static Efl.Eo.FunctionWrapper efl_access_editable_text_paste_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_access_editable_text_paste");
private static bool paste(System.IntPtr obj, System.IntPtr pd, int position)
{
Eina.Log.Debug("function efl_access_editable_text_paste was called");
var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
if (ws != null)
{
bool _ret_var = default(bool);
try
{
_ret_var = ((IText)ws.Target).Paste(position);
}
catch (Exception e)
{
Eina.Log.Warning($"Callback error: {e.ToString()}");
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
return _ret_var;
}
else
{
return efl_access_editable_text_paste_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), position);
}
}
private static efl_access_editable_text_paste_delegate efl_access_editable_text_paste_static_delegate;
#pragma warning restore CA1707, CS1591, SA1300, SA1600
}
}
}
}
}
#if EFL_BETA
#pragma warning disable CS1591
public static class Efl_Access_EditableITextConcrete_ExtensionMethods {
public static Efl.BindableProperty TextContent(this Efl.Ui.ItemFactory fac, Efl.Csharp.ExtensionTagmagic = null) where T : Efl.Access.Editable.IText {
return new Efl.BindableProperty("text_content", fac);
}
}
#pragma warning restore CS1591
#endif