1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.Threading;
7 using System.ComponentModel;
10 /// <summary>Used internally for futures on the loop</summary>
11 [Efl.LoopMessageFuture.NativeMethods]
12 [Efl.Eo.BindingEntity]
13 public class LoopMessageFuture : Efl.LoopMessage
15 ///<summary>Pointer to the native class description.</summary>
16 public override System.IntPtr NativeClass
20 if (((object)this).GetType() == typeof(LoopMessageFuture))
22 return GetEflClassStatic();
26 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
31 [System.Runtime.InteropServices.DllImport(efl.Libs.Ecore)] internal static extern System.IntPtr
32 efl_loop_message_future_class_get();
33 /// <summary>Initializes a new instance of the <see cref="LoopMessageFuture"/> class.</summary>
34 /// <param name="parent">Parent instance.</param>
35 public LoopMessageFuture(Efl.Object parent= null
36 ) : base(efl_loop_message_future_class_get(), parent)
38 FinishInstantiation();
41 /// <summary>Constructor to be used when objects are expected to be constructed from native code.</summary>
42 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
43 protected LoopMessageFuture(ConstructingHandle ch) : base(ch)
47 /// <summary>Initializes a new instance of the <see cref="LoopMessageFuture"/> class.
48 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
49 /// <param name="wh">The native pointer to be wrapped.</param>
50 protected LoopMessageFuture(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
54 /// <summary>Initializes a new instance of the <see cref="LoopMessageFuture"/> class.
55 /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
56 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
57 /// <param name="parent">The Efl.Object parent of this instance.</param>
58 protected LoopMessageFuture(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent)
62 /// <summary>No description supplied.</summary>
63 /// <returns>No description supplied.</returns>
64 virtual public System.IntPtr GetData() {
65 var _ret_var = Efl.LoopMessageFuture.NativeMethods.efl_loop_message_future_data_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)));
66 Eina.Error.RaiseIfUnhandledException();
69 /// <summary>No description supplied.</summary>
70 /// <param name="data">No description supplied.</param>
71 virtual public void SetData(System.IntPtr data) {
72 Efl.LoopMessageFuture.NativeMethods.efl_loop_message_future_data_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),data);
73 Eina.Error.RaiseIfUnhandledException();
75 /// <summary>No description supplied.</summary>
76 /// <value>No description supplied.</value>
77 public System.IntPtr Data {
78 get { return GetData(); }
79 set { SetData(value); }
81 private static IntPtr GetEflClassStatic()
83 return Efl.LoopMessageFuture.efl_loop_message_future_class_get();
85 /// <summary>Wrapper for native methods and virtual method delegates.
86 /// For internal use by generated code only.</summary>
87 public new class NativeMethods : Efl.LoopMessage.NativeMethods
89 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Ecore);
90 /// <summary>Gets the list of Eo operations to override.</summary>
91 /// <returns>The list of Eo operations to be overload.</returns>
92 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
94 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
95 var methods = Efl.Eo.Globals.GetUserMethods(type);
97 if (efl_loop_message_future_data_get_static_delegate == null)
99 efl_loop_message_future_data_get_static_delegate = new efl_loop_message_future_data_get_delegate(data_get);
102 if (methods.FirstOrDefault(m => m.Name == "GetData") != null)
104 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_message_future_data_get"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_message_future_data_get_static_delegate) });
107 if (efl_loop_message_future_data_set_static_delegate == null)
109 efl_loop_message_future_data_set_static_delegate = new efl_loop_message_future_data_set_delegate(data_set);
112 if (methods.FirstOrDefault(m => m.Name == "SetData") != null)
114 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_loop_message_future_data_set"), func = Marshal.GetFunctionPointerForDelegate(efl_loop_message_future_data_set_static_delegate) });
117 descs.AddRange(base.GetEoOps(type));
120 /// <summary>Returns the Eo class for the native methods of this class.</summary>
121 /// <returns>The native class pointer.</returns>
122 public override IntPtr GetEflClass()
124 return Efl.LoopMessageFuture.efl_loop_message_future_class_get();
127 #pragma warning disable CA1707, CS1591, SA1300, SA1600
130 private delegate System.IntPtr efl_loop_message_future_data_get_delegate(System.IntPtr obj, System.IntPtr pd);
133 public delegate System.IntPtr efl_loop_message_future_data_get_api_delegate(System.IntPtr obj);
135 public static Efl.Eo.FunctionWrapper<efl_loop_message_future_data_get_api_delegate> efl_loop_message_future_data_get_ptr = new Efl.Eo.FunctionWrapper<efl_loop_message_future_data_get_api_delegate>(Module, "efl_loop_message_future_data_get");
137 private static System.IntPtr data_get(System.IntPtr obj, System.IntPtr pd)
139 Eina.Log.Debug("function efl_loop_message_future_data_get was called");
140 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
143 System.IntPtr _ret_var = default(System.IntPtr);
146 _ret_var = ((LoopMessageFuture)ws.Target).GetData();
150 Eina.Log.Warning($"Callback error: {e.ToString()}");
151 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
159 return efl_loop_message_future_data_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
163 private static efl_loop_message_future_data_get_delegate efl_loop_message_future_data_get_static_delegate;
166 private delegate void efl_loop_message_future_data_set_delegate(System.IntPtr obj, System.IntPtr pd, System.IntPtr data);
169 public delegate void efl_loop_message_future_data_set_api_delegate(System.IntPtr obj, System.IntPtr data);
171 public static Efl.Eo.FunctionWrapper<efl_loop_message_future_data_set_api_delegate> efl_loop_message_future_data_set_ptr = new Efl.Eo.FunctionWrapper<efl_loop_message_future_data_set_api_delegate>(Module, "efl_loop_message_future_data_set");
173 private static void data_set(System.IntPtr obj, System.IntPtr pd, System.IntPtr data)
175 Eina.Log.Debug("function efl_loop_message_future_data_set was called");
176 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
182 ((LoopMessageFuture)ws.Target).SetData(data);
186 Eina.Log.Warning($"Callback error: {e.ToString()}");
187 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
194 efl_loop_message_future_data_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), data);
198 private static efl_loop_message_future_data_set_delegate efl_loop_message_future_data_set_static_delegate;
200 #pragma warning restore CA1707, CS1591, SA1300, SA1600