#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 {
/// Event argument wrapper for event .
[Efl.Eo.BindingEntity]
public class LoopMessageFutureHandlerMessageFutureEvt_Args : EventArgs {
/// Actual event payload.
/// No description supplied.
public Efl.LoopMessageFuture arg { get; set; }
}
/// Internal use for future on an efl loop - replacing legacy ecore events
/// This is a BETA class. It can be modified or removed in the future. Do not use it for product development.
[Efl.LoopMessageFutureHandler.NativeMethods]
[Efl.Eo.BindingEntity]
public class LoopMessageFutureHandler : Efl.LoopMessageHandler
{
/// Pointer to the native class description.
public override System.IntPtr NativeClass
{
get
{
if (((object)this).GetType() == typeof(LoopMessageFutureHandler))
{
return GetEflClassStatic();
}
else
{
return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
}
}
}
[System.Runtime.InteropServices.DllImport(efl.Libs.Ecore)] internal static extern System.IntPtr
efl_loop_message_future_handler_class_get();
/// Initializes a new instance of the class.
/// Parent instance.
public LoopMessageFutureHandler(Efl.Object parent= null
) : base(efl_loop_message_future_handler_class_get(), parent)
{
FinishInstantiation();
}
/// 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.
protected LoopMessageFutureHandler(ConstructingHandle ch) : base(ch)
{
}
/// Initializes a new instance of the class.
/// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.
/// The native pointer to be wrapped.
protected LoopMessageFutureHandler(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
{
}
/// Initializes a new instance of the class.
/// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.
/// The pointer to the base native Eo class.
/// The Efl.Object parent of this instance.
protected LoopMessageFutureHandler(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent)
{
}
/// No description supplied.
///
public event EventHandler MessageFutureEvt
{
add
{
lock (eflBindingEventLock)
{
Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
{
var obj = Efl.Eo.Globals.WrapperSupervisorPtrToManaged(data).Target;
if (obj != null)
{
Efl.LoopMessageFutureHandlerMessageFutureEvt_Args args = new Efl.LoopMessageFutureHandlerMessageFutureEvt_Args();
args.arg = (Efl.Eo.Globals.CreateWrapperFor(evt.Info) as Efl.LoopMessageFuture);
try
{
value?.Invoke(obj, args);
}
catch (Exception e)
{
Eina.Log.Error(e.ToString());
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
}
};
string key = "_EFL_LOOP_MESSAGE_FUTURE_HANDLER_EVENT_MESSAGE_FUTURE";
AddNativeEventHandler(efl.Libs.Ecore, key, callerCb, value);
}
}
remove
{
lock (eflBindingEventLock)
{
string key = "_EFL_LOOP_MESSAGE_FUTURE_HANDLER_EVENT_MESSAGE_FUTURE";
RemoveNativeEventHandler(efl.Libs.Ecore, key, value);
}
}
}
/// Method to raise event MessageFutureEvt.
public void OnMessageFutureEvt(Efl.LoopMessageFutureHandlerMessageFutureEvt_Args e)
{
var key = "_EFL_LOOP_MESSAGE_FUTURE_HANDLER_EVENT_MESSAGE_FUTURE";
IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Ecore, key);
if (desc == IntPtr.Zero)
{
Eina.Log.Error($"Failed to get native event {key}");
return;
}
IntPtr info = e.arg.NativeHandle;
Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, info);
}
/// No description supplied.
/// No description supplied.
virtual public Efl.LoopMessageFuture AddMessageType() {
var _ret_var = Efl.LoopMessageFutureHandler.NativeMethods.efl_loop_message_future_handler_message_type_add_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)));
Eina.Error.RaiseIfUnhandledException();
return _ret_var;
}
private static IntPtr GetEflClassStatic()
{
return Efl.LoopMessageFutureHandler.efl_loop_message_future_handler_class_get();
}
/// Wrapper for native methods and virtual method delegates.
/// For internal use by generated code only.
public new class NativeMethods : Efl.LoopMessageHandler.NativeMethods
{
private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Ecore);
/// 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_loop_message_future_handler_message_type_add_static_delegate == null)
{
efl_loop_message_future_handler_message_type_add_static_delegate = new efl_loop_message_future_handler_message_type_add_delegate(message_type_add);
}
if (methods.FirstOrDefault(m => m.Name == "AddMessageType") != null)
{
descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_message_future_handler_message_type_add"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_message_future_handler_message_type_add_static_delegate) });
}
descs.AddRange(base.GetEoOps(type));
return descs;
}
/// Returns the Eo class for the native methods of this class.
/// The native class pointer.
public override IntPtr GetEflClass()
{
return Efl.LoopMessageFutureHandler.efl_loop_message_future_handler_class_get();
}
#pragma warning disable CA1707, CS1591, SA1300, SA1600
[return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo))]
private delegate Efl.LoopMessageFuture efl_loop_message_future_handler_message_type_add_delegate(System.IntPtr obj, System.IntPtr pd);
[return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo))]
public delegate Efl.LoopMessageFuture efl_loop_message_future_handler_message_type_add_api_delegate(System.IntPtr obj);
public static Efl.Eo.FunctionWrapper efl_loop_message_future_handler_message_type_add_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_loop_message_future_handler_message_type_add");
private static Efl.LoopMessageFuture message_type_add(System.IntPtr obj, System.IntPtr pd)
{
Eina.Log.Debug("function efl_loop_message_future_handler_message_type_add was called");
var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
if (ws != null)
{
Efl.LoopMessageFuture _ret_var = default(Efl.LoopMessageFuture);
try
{
_ret_var = ((LoopMessageFutureHandler)ws.Target).AddMessageType();
}
catch (Exception e)
{
Eina.Log.Warning($"Callback error: {e.ToString()}");
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
return _ret_var;
}
else
{
return efl_loop_message_future_handler_message_type_add_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
}
}
private static efl_loop_message_future_handler_message_type_add_delegate efl_loop_message_future_handler_message_type_add_static_delegate;
#pragma warning restore CA1707, CS1591, SA1300, SA1600
}
}
}
#if EFL_BETA
#pragma warning disable CS1591
public static class EflLoopMessageFutureHandler_ExtensionMethods {
}
#pragma warning restore CS1591
#endif