1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.Threading;
7 using System.ComponentModel;
12 public partial class Constants
14 public static readonly short StackLayerMin = -32768;
24 public partial class Constants
26 public static readonly short StackLayerMax = 32767;
36 /// <summary>Efl graphics stack interface
37 /// (Since EFL 1.22)</summary>
38 [Efl.Gfx.IStackConcrete.NativeMethods]
39 public interface IStack :
40 Efl.Eo.IWrapper, IDisposable
42 /// <summary>Retrieves the layer of its canvas that the given object is part of.
43 /// See also <see cref="Efl.Gfx.IStack.SetLayer"/>
44 /// (Since EFL 1.22)</summary>
45 /// <returns>The number of the layer to place the object on. Must be between <see cref="Efl.Gfx.Constants.StackLayerMin"/> and <see cref="Efl.Gfx.Constants.StackLayerMax"/>.</returns>
47 /// <summary>Sets the layer of its canvas that the given object will be part of.
48 /// If you don't use this function, you'll be dealing with an unique layer of objects (the default one). Additional layers are handy when you don't want a set of objects to interfere with another set with regard to stacking. Two layers are completely disjoint in that matter.
50 /// This is a low-level function, which you'd be using when something should be always on top, for example.
52 /// Warning: Don't change the layer of smart objects' children. Smart objects have a layer of their own, which should contain all their child objects.
54 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>
55 /// (Since EFL 1.22)</summary>
56 /// <param name="l">The number of the layer to place the object on. Must be between <see cref="Efl.Gfx.Constants.StackLayerMin"/> and <see cref="Efl.Gfx.Constants.StackLayerMax"/>.</param>
57 void SetLayer(short l);
58 /// <summary>Get the Evas object stacked right below <c>obj</c>
59 /// This function will traverse layers in its search, if there are objects on layers below the one <c>obj</c> is placed at.
61 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>, <see cref="Efl.Gfx.IStack.SetLayer"/> and <see cref="Efl.Gfx.IStack.GetBelow"/>
62 /// (Since EFL 1.22)</summary>
63 /// <returns>The <see cref="Efl.Gfx.IStack"/> object directly below <c>obj</c>, if any, or <c>null</c>, if none.</returns>
64 Efl.Gfx.IStack GetBelow();
65 /// <summary>Get the Evas object stacked right above <c>obj</c>
66 /// This function will traverse layers in its search, if there are objects on layers above the one <c>obj</c> is placed at.
68 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>, <see cref="Efl.Gfx.IStack.SetLayer"/> and <see cref="Efl.Gfx.IStack.GetBelow"/>
69 /// (Since EFL 1.22)</summary>
70 /// <returns>The <see cref="Efl.Gfx.IStack"/> object directly below <c>obj</c>, if any, or <c>null</c>, if none.</returns>
71 Efl.Gfx.IStack GetAbove();
72 /// <summary>Stack <c>obj</c> immediately <c>below</c>
73 /// Objects, in a given canvas, are stacked in the order they're added. This means that, if they overlap, the highest ones will cover the lowest ones, in that order. This function is a way to change the stacking order for the objects.
75 /// Its intended to be used with objects belonging to the same layer in a given canvas, otherwise it will fail (and accomplish nothing).
77 /// If you have smart objects on your canvas and <c>obj</c> is a member of one of them, then <c>below</c> must also be a member of the same smart object.
79 /// Similarly, if <c>obj</c> is not a member of a smart object, <c>below</c> must not be either.
81 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>, <see cref="Efl.Gfx.IStack.SetLayer"/> and <see cref="Efl.Gfx.IStack.StackBelow"/>
82 /// (Since EFL 1.22)</summary>
83 /// <param name="below">The object below which to stack</param>
84 void StackBelow(Efl.Gfx.IStack below);
85 /// <summary>Raise <c>obj</c> to the top of its layer.
86 /// <c>obj</c> will, then, be the highest one in the layer it belongs to. Object on other layers won't get touched.
88 /// See also <see cref="Efl.Gfx.IStack.StackAbove"/>, <see cref="Efl.Gfx.IStack.StackBelow"/> and <see cref="Efl.Gfx.IStack.LowerToBottom"/>
89 /// (Since EFL 1.22)</summary>
91 /// <summary>Stack <c>obj</c> immediately <c>above</c>
92 /// Objects, in a given canvas, are stacked in the order they're added. This means that, if they overlap, the highest ones will cover the lowest ones, in that order. This function is a way to change the stacking order for the objects.
94 /// Its intended to be used with objects belonging to the same layer in a given canvas, otherwise it will fail (and accomplish nothing).
96 /// If you have smart objects on your canvas and <c>obj</c> is a member of one of them, then <c>above</c> must also be a member of the same smart object.
98 /// Similarly, if <c>obj</c> is not a member of a smart object, <c>above</c> must not be either.
100 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>, <see cref="Efl.Gfx.IStack.SetLayer"/> and <see cref="Efl.Gfx.IStack.StackBelow"/>
101 /// (Since EFL 1.22)</summary>
102 /// <param name="above">The object above which to stack</param>
103 void StackAbove(Efl.Gfx.IStack above);
104 /// <summary>Lower <c>obj</c> to the bottom of its layer.
105 /// <c>obj</c> will, then, be the lowest one in the layer it belongs to. Objects on other layers won't get touched.
107 /// See also <see cref="Efl.Gfx.IStack.StackAbove"/>, <see cref="Efl.Gfx.IStack.StackBelow"/> and <see cref="Efl.Gfx.IStack.RaiseToTop"/>
108 /// (Since EFL 1.22)</summary>
109 void LowerToBottom();
110 /// <summary>Object stacking was changed.
111 /// (Since EFL 1.22)</summary>
112 event EventHandler StackingChangedEvt;
113 /// <summary>Retrieves the layer of its canvas that the given object is part of.
114 /// See also <see cref="Efl.Gfx.IStack.SetLayer"/>
115 /// (Since EFL 1.22)</summary>
116 /// <value>The number of the layer to place the object on. Must be between <see cref="Efl.Gfx.Constants.StackLayerMin"/> and <see cref="Efl.Gfx.Constants.StackLayerMax"/>.</value>
121 /// <summary>Get the Evas object stacked right below <c>obj</c>
122 /// This function will traverse layers in its search, if there are objects on layers below the one <c>obj</c> is placed at.
124 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>, <see cref="Efl.Gfx.IStack.SetLayer"/> and <see cref="Efl.Gfx.IStack.GetBelow"/>
125 /// (Since EFL 1.22)</summary>
126 /// <value>The <see cref="Efl.Gfx.IStack"/> object directly below <c>obj</c>, if any, or <c>null</c>, if none.</value>
127 Efl.Gfx.IStack Below {
130 /// <summary>Get the Evas object stacked right above <c>obj</c>
131 /// This function will traverse layers in its search, if there are objects on layers above the one <c>obj</c> is placed at.
133 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>, <see cref="Efl.Gfx.IStack.SetLayer"/> and <see cref="Efl.Gfx.IStack.GetBelow"/>
134 /// (Since EFL 1.22)</summary>
135 /// <value>The <see cref="Efl.Gfx.IStack"/> object directly below <c>obj</c>, if any, or <c>null</c>, if none.</value>
136 Efl.Gfx.IStack Above {
140 /// <summary>Efl graphics stack interface
141 /// (Since EFL 1.22)</summary>
142 sealed public class IStackConcrete :
147 ///<summary>Pointer to the native class description.</summary>
148 public System.IntPtr NativeClass
152 if (((object)this).GetType() == typeof(IStackConcrete))
154 return GetEflClassStatic();
158 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
163 private Dictionary<(IntPtr desc, object evtDelegate), (IntPtr evtCallerPtr, Efl.EventCb evtCaller)> eoEvents = new Dictionary<(IntPtr desc, object evtDelegate), (IntPtr evtCallerPtr, Efl.EventCb evtCaller)>();
164 private readonly object eventLock = new object();
165 private System.IntPtr handle;
166 ///<summary>Pointer to the native instance.</summary>
167 public System.IntPtr NativeHandle
169 get { return handle; }
172 [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
173 efl_gfx_stack_interface_get();
174 /// <summary>Initializes a new instance of the <see cref="IStack"/> class.
175 /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
176 private IStackConcrete(System.IntPtr raw)
180 ///<summary>Destructor.</summary>
186 ///<summary>Releases the underlying native instance.</summary>
187 private void Dispose(bool disposing)
189 if (handle != System.IntPtr.Zero)
192 handle = IntPtr.Zero;
194 IntPtr gcHandlePtr = IntPtr.Zero;
195 if (eoEvents.Count != 0)
197 GCHandle gcHandle = GCHandle.Alloc(eoEvents);
198 gcHandlePtr = GCHandle.ToIntPtr(gcHandle);
203 Efl.Eo.Globals.efl_mono_native_dispose(h, gcHandlePtr);
207 Monitor.Enter(Efl.All.InitLock);
208 if (Efl.All.MainLoopInitialized)
210 Efl.Eo.Globals.efl_mono_thread_safe_native_dispose(h, gcHandlePtr);
213 Monitor.Exit(Efl.All.InitLock);
219 ///<summary>Releases the underlying native instance.</summary>
220 public void Dispose()
223 GC.SuppressFinalize(this);
226 /// <summary>Verifies if the given object is equal to this one.</summary>
227 /// <param name="instance">The object to compare to.</param>
228 /// <returns>True if both objects point to the same native object.</returns>
229 public override bool Equals(object instance)
231 var other = instance as Efl.Object;
236 return this.NativeHandle == other.NativeHandle;
239 /// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>
240 /// <returns>The value of the pointer, to be used as the hash code of this object.</returns>
241 public override int GetHashCode()
243 return this.NativeHandle.ToInt32();
246 /// <summary>Turns the native pointer into a string representation.</summary>
247 /// <returns>A string with the type and the native pointer for this object.</returns>
248 public override String ToString()
250 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
253 ///<summary>Adds a new event handler, registering it to the native event. For internal use only.</summary>
254 ///<param name="lib">The name of the native library definining the event.</param>
255 ///<param name="key">The name of the native event.</param>
256 ///<param name="evtCaller">Delegate to be called by native code on event raising.</param>
257 ///<param name="evtDelegate">Managed delegate that will be called by evtCaller on event raising.</param>
258 private void AddNativeEventHandler(string lib, string key, Efl.EventCb evtCaller, object evtDelegate)
260 IntPtr desc = Efl.EventDescription.GetNative(lib, key);
261 if (desc == IntPtr.Zero)
263 Eina.Log.Error($"Failed to get native event {key}");
266 if (eoEvents.ContainsKey((desc, evtDelegate)))
268 Eina.Log.Warning($"Event proxy for event {key} already registered!");
272 IntPtr evtCallerPtr = Marshal.GetFunctionPointerForDelegate(evtCaller);
273 if (!Efl.Eo.Globals.efl_event_callback_priority_add(handle, desc, 0, evtCallerPtr, IntPtr.Zero))
275 Eina.Log.Error($"Failed to add event proxy for event {key}");
279 eoEvents[(desc, evtDelegate)] = (evtCallerPtr, evtCaller);
280 Eina.Error.RaiseIfUnhandledException();
283 ///<summary>Removes the given event handler for the given event. For internal use only.</summary>
284 ///<param name="lib">The name of the native library definining the event.</param>
285 ///<param name="key">The name of the native event.</param>
286 ///<param name="evtDelegate">The delegate to be removed.</param>
287 private void RemoveNativeEventHandler(string lib, string key, object evtDelegate)
289 IntPtr desc = Efl.EventDescription.GetNative(lib, key);
290 if (desc == IntPtr.Zero)
292 Eina.Log.Error($"Failed to get native event {key}");
296 var evtPair = (desc, evtDelegate);
297 if (eoEvents.TryGetValue(evtPair, out var caller))
299 if (!Efl.Eo.Globals.efl_event_callback_del(handle, desc, caller.evtCallerPtr, IntPtr.Zero))
301 Eina.Log.Error($"Failed to remove event proxy for event {key}");
305 eoEvents.Remove(evtPair);
306 Eina.Error.RaiseIfUnhandledException();
310 Eina.Log.Error($"Trying to remove proxy for event {key} when it is nothing registered.");
314 /// <summary>Object stacking was changed.
315 /// (Since EFL 1.22)</summary>
316 public event EventHandler StackingChangedEvt
322 var wRef = new WeakReference(this);
323 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
325 var obj = wRef.Target as Efl.Eo.IWrapper;
328 EventArgs args = EventArgs.Empty;
331 value?.Invoke(obj, args);
335 Eina.Log.Error(e.ToString());
336 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
341 string key = "_EFL_GFX_ENTITY_EVENT_STACKING_CHANGED";
342 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
350 string key = "_EFL_GFX_ENTITY_EVENT_STACKING_CHANGED";
351 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
355 ///<summary>Method to raise event StackingChangedEvt.</summary>
356 public void OnStackingChangedEvt(EventArgs e)
358 var key = "_EFL_GFX_ENTITY_EVENT_STACKING_CHANGED";
359 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
360 if (desc == IntPtr.Zero)
362 Eina.Log.Error($"Failed to get native event {key}");
366 Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
368 /// <summary>Retrieves the layer of its canvas that the given object is part of.
369 /// See also <see cref="Efl.Gfx.IStack.SetLayer"/>
370 /// (Since EFL 1.22)</summary>
371 /// <returns>The number of the layer to place the object on. Must be between <see cref="Efl.Gfx.Constants.StackLayerMin"/> and <see cref="Efl.Gfx.Constants.StackLayerMax"/>.</returns>
372 public short GetLayer() {
373 var _ret_var = Efl.Gfx.IStackConcrete.NativeMethods.efl_gfx_stack_layer_get_ptr.Value.Delegate(this.NativeHandle);
374 Eina.Error.RaiseIfUnhandledException();
377 /// <summary>Sets the layer of its canvas that the given object will be part of.
378 /// If you don't use this function, you'll be dealing with an unique layer of objects (the default one). Additional layers are handy when you don't want a set of objects to interfere with another set with regard to stacking. Two layers are completely disjoint in that matter.
380 /// This is a low-level function, which you'd be using when something should be always on top, for example.
382 /// Warning: Don't change the layer of smart objects' children. Smart objects have a layer of their own, which should contain all their child objects.
384 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>
385 /// (Since EFL 1.22)</summary>
386 /// <param name="l">The number of the layer to place the object on. Must be between <see cref="Efl.Gfx.Constants.StackLayerMin"/> and <see cref="Efl.Gfx.Constants.StackLayerMax"/>.</param>
387 public void SetLayer(short l) {
388 Efl.Gfx.IStackConcrete.NativeMethods.efl_gfx_stack_layer_set_ptr.Value.Delegate(this.NativeHandle,l);
389 Eina.Error.RaiseIfUnhandledException();
391 /// <summary>Get the Evas object stacked right below <c>obj</c>
392 /// This function will traverse layers in its search, if there are objects on layers below the one <c>obj</c> is placed at.
394 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>, <see cref="Efl.Gfx.IStack.SetLayer"/> and <see cref="Efl.Gfx.IStack.GetBelow"/>
395 /// (Since EFL 1.22)</summary>
396 /// <returns>The <see cref="Efl.Gfx.IStack"/> object directly below <c>obj</c>, if any, or <c>null</c>, if none.</returns>
397 public Efl.Gfx.IStack GetBelow() {
398 var _ret_var = Efl.Gfx.IStackConcrete.NativeMethods.efl_gfx_stack_below_get_ptr.Value.Delegate(this.NativeHandle);
399 Eina.Error.RaiseIfUnhandledException();
402 /// <summary>Get the Evas object stacked right above <c>obj</c>
403 /// This function will traverse layers in its search, if there are objects on layers above the one <c>obj</c> is placed at.
405 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>, <see cref="Efl.Gfx.IStack.SetLayer"/> and <see cref="Efl.Gfx.IStack.GetBelow"/>
406 /// (Since EFL 1.22)</summary>
407 /// <returns>The <see cref="Efl.Gfx.IStack"/> object directly below <c>obj</c>, if any, or <c>null</c>, if none.</returns>
408 public Efl.Gfx.IStack GetAbove() {
409 var _ret_var = Efl.Gfx.IStackConcrete.NativeMethods.efl_gfx_stack_above_get_ptr.Value.Delegate(this.NativeHandle);
410 Eina.Error.RaiseIfUnhandledException();
413 /// <summary>Stack <c>obj</c> immediately <c>below</c>
414 /// Objects, in a given canvas, are stacked in the order they're added. This means that, if they overlap, the highest ones will cover the lowest ones, in that order. This function is a way to change the stacking order for the objects.
416 /// Its intended to be used with objects belonging to the same layer in a given canvas, otherwise it will fail (and accomplish nothing).
418 /// If you have smart objects on your canvas and <c>obj</c> is a member of one of them, then <c>below</c> must also be a member of the same smart object.
420 /// Similarly, if <c>obj</c> is not a member of a smart object, <c>below</c> must not be either.
422 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>, <see cref="Efl.Gfx.IStack.SetLayer"/> and <see cref="Efl.Gfx.IStack.StackBelow"/>
423 /// (Since EFL 1.22)</summary>
424 /// <param name="below">The object below which to stack</param>
425 public void StackBelow(Efl.Gfx.IStack below) {
426 Efl.Gfx.IStackConcrete.NativeMethods.efl_gfx_stack_below_ptr.Value.Delegate(this.NativeHandle,below);
427 Eina.Error.RaiseIfUnhandledException();
429 /// <summary>Raise <c>obj</c> to the top of its layer.
430 /// <c>obj</c> will, then, be the highest one in the layer it belongs to. Object on other layers won't get touched.
432 /// See also <see cref="Efl.Gfx.IStack.StackAbove"/>, <see cref="Efl.Gfx.IStack.StackBelow"/> and <see cref="Efl.Gfx.IStack.LowerToBottom"/>
433 /// (Since EFL 1.22)</summary>
434 public void RaiseToTop() {
435 Efl.Gfx.IStackConcrete.NativeMethods.efl_gfx_stack_raise_to_top_ptr.Value.Delegate(this.NativeHandle);
436 Eina.Error.RaiseIfUnhandledException();
438 /// <summary>Stack <c>obj</c> immediately <c>above</c>
439 /// Objects, in a given canvas, are stacked in the order they're added. This means that, if they overlap, the highest ones will cover the lowest ones, in that order. This function is a way to change the stacking order for the objects.
441 /// Its intended to be used with objects belonging to the same layer in a given canvas, otherwise it will fail (and accomplish nothing).
443 /// If you have smart objects on your canvas and <c>obj</c> is a member of one of them, then <c>above</c> must also be a member of the same smart object.
445 /// Similarly, if <c>obj</c> is not a member of a smart object, <c>above</c> must not be either.
447 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>, <see cref="Efl.Gfx.IStack.SetLayer"/> and <see cref="Efl.Gfx.IStack.StackBelow"/>
448 /// (Since EFL 1.22)</summary>
449 /// <param name="above">The object above which to stack</param>
450 public void StackAbove(Efl.Gfx.IStack above) {
451 Efl.Gfx.IStackConcrete.NativeMethods.efl_gfx_stack_above_ptr.Value.Delegate(this.NativeHandle,above);
452 Eina.Error.RaiseIfUnhandledException();
454 /// <summary>Lower <c>obj</c> to the bottom of its layer.
455 /// <c>obj</c> will, then, be the lowest one in the layer it belongs to. Objects on other layers won't get touched.
457 /// See also <see cref="Efl.Gfx.IStack.StackAbove"/>, <see cref="Efl.Gfx.IStack.StackBelow"/> and <see cref="Efl.Gfx.IStack.RaiseToTop"/>
458 /// (Since EFL 1.22)</summary>
459 public void LowerToBottom() {
460 Efl.Gfx.IStackConcrete.NativeMethods.efl_gfx_stack_lower_to_bottom_ptr.Value.Delegate(this.NativeHandle);
461 Eina.Error.RaiseIfUnhandledException();
463 /// <summary>Retrieves the layer of its canvas that the given object is part of.
464 /// See also <see cref="Efl.Gfx.IStack.SetLayer"/>
465 /// (Since EFL 1.22)</summary>
466 /// <value>The number of the layer to place the object on. Must be between <see cref="Efl.Gfx.Constants.StackLayerMin"/> and <see cref="Efl.Gfx.Constants.StackLayerMax"/>.</value>
468 get { return GetLayer(); }
469 set { SetLayer(value); }
471 /// <summary>Get the Evas object stacked right below <c>obj</c>
472 /// This function will traverse layers in its search, if there are objects on layers below the one <c>obj</c> is placed at.
474 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>, <see cref="Efl.Gfx.IStack.SetLayer"/> and <see cref="Efl.Gfx.IStack.GetBelow"/>
475 /// (Since EFL 1.22)</summary>
476 /// <value>The <see cref="Efl.Gfx.IStack"/> object directly below <c>obj</c>, if any, or <c>null</c>, if none.</value>
477 public Efl.Gfx.IStack Below {
478 get { return GetBelow(); }
480 /// <summary>Get the Evas object stacked right above <c>obj</c>
481 /// This function will traverse layers in its search, if there are objects on layers above the one <c>obj</c> is placed at.
483 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>, <see cref="Efl.Gfx.IStack.SetLayer"/> and <see cref="Efl.Gfx.IStack.GetBelow"/>
484 /// (Since EFL 1.22)</summary>
485 /// <value>The <see cref="Efl.Gfx.IStack"/> object directly below <c>obj</c>, if any, or <c>null</c>, if none.</value>
486 public Efl.Gfx.IStack Above {
487 get { return GetAbove(); }
489 private static IntPtr GetEflClassStatic()
491 return Efl.Gfx.IStackConcrete.efl_gfx_stack_interface_get();
493 /// <summary>Wrapper for native methods and virtual method delegates.
494 /// For internal use by generated code only.</summary>
495 public class NativeMethods : Efl.Eo.NativeClass
497 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Efl);
498 /// <summary>Gets the list of Eo operations to override.</summary>
499 /// <returns>The list of Eo operations to be overload.</returns>
500 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
502 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
503 var methods = Efl.Eo.Globals.GetUserMethods(type);
505 if (efl_gfx_stack_layer_get_static_delegate == null)
507 efl_gfx_stack_layer_get_static_delegate = new efl_gfx_stack_layer_get_delegate(layer_get);
510 if (methods.FirstOrDefault(m => m.Name == "GetLayer") != null)
512 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_stack_layer_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_stack_layer_get_static_delegate) });
515 if (efl_gfx_stack_layer_set_static_delegate == null)
517 efl_gfx_stack_layer_set_static_delegate = new efl_gfx_stack_layer_set_delegate(layer_set);
520 if (methods.FirstOrDefault(m => m.Name == "SetLayer") != null)
522 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_stack_layer_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_stack_layer_set_static_delegate) });
525 if (efl_gfx_stack_below_get_static_delegate == null)
527 efl_gfx_stack_below_get_static_delegate = new efl_gfx_stack_below_get_delegate(below_get);
530 if (methods.FirstOrDefault(m => m.Name == "GetBelow") != null)
532 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_stack_below_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_stack_below_get_static_delegate) });
535 if (efl_gfx_stack_above_get_static_delegate == null)
537 efl_gfx_stack_above_get_static_delegate = new efl_gfx_stack_above_get_delegate(above_get);
540 if (methods.FirstOrDefault(m => m.Name == "GetAbove") != null)
542 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_stack_above_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_stack_above_get_static_delegate) });
545 if (efl_gfx_stack_below_static_delegate == null)
547 efl_gfx_stack_below_static_delegate = new efl_gfx_stack_below_delegate(stack_below);
550 if (methods.FirstOrDefault(m => m.Name == "StackBelow") != null)
552 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_stack_below"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_stack_below_static_delegate) });
555 if (efl_gfx_stack_raise_to_top_static_delegate == null)
557 efl_gfx_stack_raise_to_top_static_delegate = new efl_gfx_stack_raise_to_top_delegate(raise_to_top);
560 if (methods.FirstOrDefault(m => m.Name == "RaiseToTop") != null)
562 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_stack_raise_to_top"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_stack_raise_to_top_static_delegate) });
565 if (efl_gfx_stack_above_static_delegate == null)
567 efl_gfx_stack_above_static_delegate = new efl_gfx_stack_above_delegate(stack_above);
570 if (methods.FirstOrDefault(m => m.Name == "StackAbove") != null)
572 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_stack_above"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_stack_above_static_delegate) });
575 if (efl_gfx_stack_lower_to_bottom_static_delegate == null)
577 efl_gfx_stack_lower_to_bottom_static_delegate = new efl_gfx_stack_lower_to_bottom_delegate(lower_to_bottom);
580 if (methods.FirstOrDefault(m => m.Name == "LowerToBottom") != null)
582 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_stack_lower_to_bottom"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_stack_lower_to_bottom_static_delegate) });
587 /// <summary>Returns the Eo class for the native methods of this class.</summary>
588 /// <returns>The native class pointer.</returns>
589 public override IntPtr GetEflClass()
591 return Efl.Gfx.IStackConcrete.efl_gfx_stack_interface_get();
594 #pragma warning disable CA1707, SA1300, SA1600
597 private delegate short efl_gfx_stack_layer_get_delegate(System.IntPtr obj, System.IntPtr pd);
600 public delegate short efl_gfx_stack_layer_get_api_delegate(System.IntPtr obj);
602 public static Efl.Eo.FunctionWrapper<efl_gfx_stack_layer_get_api_delegate> efl_gfx_stack_layer_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_stack_layer_get_api_delegate>(Module, "efl_gfx_stack_layer_get");
604 private static short layer_get(System.IntPtr obj, System.IntPtr pd)
606 Eina.Log.Debug("function efl_gfx_stack_layer_get was called");
607 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
610 short _ret_var = default(short);
613 _ret_var = ((IStack)wrapper).GetLayer();
617 Eina.Log.Warning($"Callback error: {e.ToString()}");
618 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
626 return efl_gfx_stack_layer_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
630 private static efl_gfx_stack_layer_get_delegate efl_gfx_stack_layer_get_static_delegate;
633 private delegate void efl_gfx_stack_layer_set_delegate(System.IntPtr obj, System.IntPtr pd, short l);
636 public delegate void efl_gfx_stack_layer_set_api_delegate(System.IntPtr obj, short l);
638 public static Efl.Eo.FunctionWrapper<efl_gfx_stack_layer_set_api_delegate> efl_gfx_stack_layer_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_stack_layer_set_api_delegate>(Module, "efl_gfx_stack_layer_set");
640 private static void layer_set(System.IntPtr obj, System.IntPtr pd, short l)
642 Eina.Log.Debug("function efl_gfx_stack_layer_set was called");
643 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
649 ((IStack)wrapper).SetLayer(l);
653 Eina.Log.Warning($"Callback error: {e.ToString()}");
654 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
661 efl_gfx_stack_layer_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), l);
665 private static efl_gfx_stack_layer_set_delegate efl_gfx_stack_layer_set_static_delegate;
667 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))]
668 private delegate Efl.Gfx.IStack efl_gfx_stack_below_get_delegate(System.IntPtr obj, System.IntPtr pd);
670 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))]
671 public delegate Efl.Gfx.IStack efl_gfx_stack_below_get_api_delegate(System.IntPtr obj);
673 public static Efl.Eo.FunctionWrapper<efl_gfx_stack_below_get_api_delegate> efl_gfx_stack_below_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_stack_below_get_api_delegate>(Module, "efl_gfx_stack_below_get");
675 private static Efl.Gfx.IStack below_get(System.IntPtr obj, System.IntPtr pd)
677 Eina.Log.Debug("function efl_gfx_stack_below_get was called");
678 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
681 Efl.Gfx.IStack _ret_var = default(Efl.Gfx.IStack);
684 _ret_var = ((IStack)wrapper).GetBelow();
688 Eina.Log.Warning($"Callback error: {e.ToString()}");
689 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
697 return efl_gfx_stack_below_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
701 private static efl_gfx_stack_below_get_delegate efl_gfx_stack_below_get_static_delegate;
703 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))]
704 private delegate Efl.Gfx.IStack efl_gfx_stack_above_get_delegate(System.IntPtr obj, System.IntPtr pd);
706 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))]
707 public delegate Efl.Gfx.IStack efl_gfx_stack_above_get_api_delegate(System.IntPtr obj);
709 public static Efl.Eo.FunctionWrapper<efl_gfx_stack_above_get_api_delegate> efl_gfx_stack_above_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_stack_above_get_api_delegate>(Module, "efl_gfx_stack_above_get");
711 private static Efl.Gfx.IStack above_get(System.IntPtr obj, System.IntPtr pd)
713 Eina.Log.Debug("function efl_gfx_stack_above_get was called");
714 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
717 Efl.Gfx.IStack _ret_var = default(Efl.Gfx.IStack);
720 _ret_var = ((IStack)wrapper).GetAbove();
724 Eina.Log.Warning($"Callback error: {e.ToString()}");
725 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
733 return efl_gfx_stack_above_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
737 private static efl_gfx_stack_above_get_delegate efl_gfx_stack_above_get_static_delegate;
740 private delegate void efl_gfx_stack_below_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Gfx.IStack below);
743 public delegate void efl_gfx_stack_below_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Gfx.IStack below);
745 public static Efl.Eo.FunctionWrapper<efl_gfx_stack_below_api_delegate> efl_gfx_stack_below_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_stack_below_api_delegate>(Module, "efl_gfx_stack_below");
747 private static void stack_below(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.IStack below)
749 Eina.Log.Debug("function efl_gfx_stack_below was called");
750 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
756 ((IStack)wrapper).StackBelow(below);
760 Eina.Log.Warning($"Callback error: {e.ToString()}");
761 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
768 efl_gfx_stack_below_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), below);
772 private static efl_gfx_stack_below_delegate efl_gfx_stack_below_static_delegate;
775 private delegate void efl_gfx_stack_raise_to_top_delegate(System.IntPtr obj, System.IntPtr pd);
778 public delegate void efl_gfx_stack_raise_to_top_api_delegate(System.IntPtr obj);
780 public static Efl.Eo.FunctionWrapper<efl_gfx_stack_raise_to_top_api_delegate> efl_gfx_stack_raise_to_top_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_stack_raise_to_top_api_delegate>(Module, "efl_gfx_stack_raise_to_top");
782 private static void raise_to_top(System.IntPtr obj, System.IntPtr pd)
784 Eina.Log.Debug("function efl_gfx_stack_raise_to_top was called");
785 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
791 ((IStack)wrapper).RaiseToTop();
795 Eina.Log.Warning($"Callback error: {e.ToString()}");
796 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
803 efl_gfx_stack_raise_to_top_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
807 private static efl_gfx_stack_raise_to_top_delegate efl_gfx_stack_raise_to_top_static_delegate;
810 private delegate void efl_gfx_stack_above_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Gfx.IStack above);
813 public delegate void efl_gfx_stack_above_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Gfx.IStack above);
815 public static Efl.Eo.FunctionWrapper<efl_gfx_stack_above_api_delegate> efl_gfx_stack_above_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_stack_above_api_delegate>(Module, "efl_gfx_stack_above");
817 private static void stack_above(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.IStack above)
819 Eina.Log.Debug("function efl_gfx_stack_above was called");
820 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
826 ((IStack)wrapper).StackAbove(above);
830 Eina.Log.Warning($"Callback error: {e.ToString()}");
831 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
838 efl_gfx_stack_above_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), above);
842 private static efl_gfx_stack_above_delegate efl_gfx_stack_above_static_delegate;
845 private delegate void efl_gfx_stack_lower_to_bottom_delegate(System.IntPtr obj, System.IntPtr pd);
848 public delegate void efl_gfx_stack_lower_to_bottom_api_delegate(System.IntPtr obj);
850 public static Efl.Eo.FunctionWrapper<efl_gfx_stack_lower_to_bottom_api_delegate> efl_gfx_stack_lower_to_bottom_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_stack_lower_to_bottom_api_delegate>(Module, "efl_gfx_stack_lower_to_bottom");
852 private static void lower_to_bottom(System.IntPtr obj, System.IntPtr pd)
854 Eina.Log.Debug("function efl_gfx_stack_lower_to_bottom was called");
855 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
861 ((IStack)wrapper).LowerToBottom();
865 Eina.Log.Warning($"Callback error: {e.ToString()}");
866 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
873 efl_gfx_stack_lower_to_bottom_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
877 private static efl_gfx_stack_lower_to_bottom_delegate efl_gfx_stack_lower_to_bottom_static_delegate;
879 #pragma warning restore CA1707, SA1300, SA1600