1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.ComponentModel;
7 namespace Efl { namespace Gfx {
8 public partial class Constants {
9 public static readonly short StackLayerMin = -32768;
12 namespace Efl { namespace Gfx {
13 public partial class Constants {
14 public static readonly short StackLayerMax = 32767;
17 namespace Efl { namespace Gfx {
18 /// <summary>Efl graphics stack interface
19 /// (Since EFL 1.22)</summary>
21 public interface IStack :
22 Efl.Eo.IWrapper, IDisposable
24 /// <summary>Retrieves the layer of its canvas that the given object is part of.
25 /// See also <see cref="Efl.Gfx.IStack.SetLayer"/>
26 /// (Since EFL 1.22)</summary>
27 /// <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>
29 /// <summary>Sets the layer of its canvas that the given object will be part of.
30 /// 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.
32 /// This is a low-level function, which you'd be using when something should be always on top, for example.
34 /// 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.
36 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>
37 /// (Since EFL 1.22)</summary>
38 /// <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>
39 /// <returns></returns>
40 void SetLayer( short l);
41 /// <summary>Get the Evas object stacked right below <c>obj</c>
42 /// This function will traverse layers in its search, if there are objects on layers below the one <c>obj</c> is placed at.
44 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>, <see cref="Efl.Gfx.IStack.SetLayer"/> and <see cref="Efl.Gfx.IStack.GetBelow"/>
45 /// (Since EFL 1.22)</summary>
46 /// <returns>The <see cref="Efl.Gfx.IStack"/> object directly below <c>obj</c>, if any, or <c>null</c>, if none.</returns>
47 Efl.Gfx.IStack GetBelow();
48 /// <summary>Get the Evas object stacked right above <c>obj</c>
49 /// This function will traverse layers in its search, if there are objects on layers above the one <c>obj</c> is placed at.
51 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>, <see cref="Efl.Gfx.IStack.SetLayer"/> and <see cref="Efl.Gfx.IStack.GetBelow"/>
52 /// (Since EFL 1.22)</summary>
53 /// <returns>The <see cref="Efl.Gfx.IStack"/> object directly below <c>obj</c>, if any, or <c>null</c>, if none.</returns>
54 Efl.Gfx.IStack GetAbove();
55 /// <summary>Stack <c>obj</c> immediately <c>below</c>
56 /// 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.
58 /// Its intended to be used with objects belonging to the same layer in a given canvas, otherwise it will fail (and accomplish nothing).
60 /// 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.
62 /// Similarly, if <c>obj</c> is not a member of a smart object, <c>below</c> must not be either.
64 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>, <see cref="Efl.Gfx.IStack.SetLayer"/> and <see cref="Efl.Gfx.IStack.StackBelow"/>
65 /// (Since EFL 1.22)</summary>
66 /// <param name="below">The object below which to stack</param>
67 /// <returns></returns>
68 void StackBelow( Efl.Gfx.IStack below);
69 /// <summary>Raise <c>obj</c> to the top of its layer.
70 /// <c>obj</c> will, then, be the highest one in the layer it belongs to. Object on other layers won't get touched.
72 /// See also <see cref="Efl.Gfx.IStack.StackAbove"/>, <see cref="Efl.Gfx.IStack.StackBelow"/> and <see cref="Efl.Gfx.IStack.LowerToBottom"/>
73 /// (Since EFL 1.22)</summary>
74 /// <returns></returns>
76 /// <summary>Stack <c>obj</c> immediately <c>above</c>
77 /// 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.
79 /// Its intended to be used with objects belonging to the same layer in a given canvas, otherwise it will fail (and accomplish nothing).
81 /// 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.
83 /// Similarly, if <c>obj</c> is not a member of a smart object, <c>above</c> must not be either.
85 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>, <see cref="Efl.Gfx.IStack.SetLayer"/> and <see cref="Efl.Gfx.IStack.StackBelow"/>
86 /// (Since EFL 1.22)</summary>
87 /// <param name="above">The object above which to stack</param>
88 /// <returns></returns>
89 void StackAbove( Efl.Gfx.IStack above);
90 /// <summary>Lower <c>obj</c> to the bottom of its layer.
91 /// <c>obj</c> will, then, be the lowest one in the layer it belongs to. Objects on other layers won't get touched.
93 /// See also <see cref="Efl.Gfx.IStack.StackAbove"/>, <see cref="Efl.Gfx.IStack.StackBelow"/> and <see cref="Efl.Gfx.IStack.RaiseToTop"/>
94 /// (Since EFL 1.22)</summary>
95 /// <returns></returns>
97 /// <summary>Object stacking was changed.
98 /// (Since EFL 1.22)</summary>
99 event EventHandler StackingChangedEvt;
100 /// <summary>Retrieves the layer of its canvas that the given object is part of.
101 /// See also <see cref="Efl.Gfx.IStack.SetLayer"/>
102 /// (Since EFL 1.22)</summary>
103 /// <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>
108 /// <summary>Get the Evas object stacked right below <c>obj</c>
109 /// This function will traverse layers in its search, if there are objects on layers below the one <c>obj</c> is placed at.
111 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>, <see cref="Efl.Gfx.IStack.SetLayer"/> and <see cref="Efl.Gfx.IStack.GetBelow"/>
112 /// (Since EFL 1.22)</summary>
113 /// <value>The <see cref="Efl.Gfx.IStack"/> object directly below <c>obj</c>, if any, or <c>null</c>, if none.</value>
114 Efl.Gfx.IStack Below {
117 /// <summary>Get the Evas object stacked right above <c>obj</c>
118 /// This function will traverse layers in its search, if there are objects on layers above the one <c>obj</c> is placed at.
120 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>, <see cref="Efl.Gfx.IStack.SetLayer"/> and <see cref="Efl.Gfx.IStack.GetBelow"/>
121 /// (Since EFL 1.22)</summary>
122 /// <value>The <see cref="Efl.Gfx.IStack"/> object directly below <c>obj</c>, if any, or <c>null</c>, if none.</value>
123 Efl.Gfx.IStack Above {
127 /// <summary>Efl graphics stack interface
128 /// (Since EFL 1.22)</summary>
129 sealed public class IStackConcrete :
134 ///<summary>Pointer to the native class description.</summary>
135 public System.IntPtr NativeClass {
137 if (((object)this).GetType() == typeof (IStackConcrete))
138 return Efl.Gfx.IStackNativeInherit.GetEflClassStatic();
140 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
143 private EventHandlerList eventHandlers = new EventHandlerList();
144 private System.IntPtr handle;
145 ///<summary>Pointer to the native instance.</summary>
146 public System.IntPtr NativeHandle {
147 get { return handle; }
149 [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
150 efl_gfx_stack_interface_get();
151 ///<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>
152 private IStackConcrete(System.IntPtr raw)
155 RegisterEventProxies();
157 ///<summary>Destructor.</summary>
162 ///<summary>Releases the underlying native instance.</summary>
163 void Dispose(bool disposing)
165 if (handle != System.IntPtr.Zero) {
166 Efl.Eo.Globals.efl_unref(handle);
167 handle = System.IntPtr.Zero;
170 ///<summary>Releases the underlying native instance.</summary>
171 public void Dispose()
174 GC.SuppressFinalize(this);
176 ///<summary>Verifies if the given object is equal to this one.</summary>
177 public override bool Equals(object obj)
179 var other = obj as Efl.Object;
182 return this.NativeHandle == other.NativeHandle;
184 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
185 public override int GetHashCode()
187 return this.NativeHandle.ToInt32();
189 ///<summary>Turns the native pointer into a string representation.</summary>
190 public override String ToString()
192 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
194 private readonly object eventLock = new object();
195 private Dictionary<string, int> event_cb_count = new Dictionary<string, int>();
196 ///<summary>Adds a new event handler, registering it to the native event. For internal use only.</summary>
197 ///<param name="lib">The name of the native library definining the event.</param>
198 ///<param name="key">The name of the native event.</param>
199 ///<param name="evt_delegate">The delegate to be called on event raising.</param>
200 ///<returns>True if the delegate was successfully registered.</returns>
201 private bool AddNativeEventHandler(string lib, string key, Efl.EventCb evt_delegate) {
203 if (!event_cb_count.TryGetValue(key, out event_count))
204 event_cb_count[key] = event_count;
205 if (event_count == 0) {
206 IntPtr desc = Efl.EventDescription.GetNative(lib, key);
207 if (desc == IntPtr.Zero) {
208 Eina.Log.Error($"Failed to get native event {key}");
211 bool result = Efl.Eo.Globals.efl_event_callback_priority_add(handle, desc, 0, evt_delegate, System.IntPtr.Zero);
213 Eina.Log.Error($"Failed to add event proxy for event {key}");
216 Eina.Error.RaiseIfUnhandledException();
218 event_cb_count[key]++;
221 ///<summary>Removes the given event handler for the given event. For internal use only.</summary>
222 ///<param name="key">The name of the native event.</param>
223 ///<param name="evt_delegate">The delegate to be removed.</param>
224 ///<returns>True if the delegate was successfully registered.</returns>
225 private bool RemoveNativeEventHandler(string key, Efl.EventCb evt_delegate) {
227 if (!event_cb_count.TryGetValue(key, out event_count))
228 event_cb_count[key] = event_count;
229 if (event_count == 1) {
230 IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
231 if (desc == IntPtr.Zero) {
232 Eina.Log.Error($"Failed to get native event {key}");
235 bool result = Efl.Eo.Globals.efl_event_callback_del(handle, desc, evt_delegate, System.IntPtr.Zero);
237 Eina.Log.Error($"Failed to remove event proxy for event {key}");
240 Eina.Error.RaiseIfUnhandledException();
241 } else if (event_count == 0) {
242 Eina.Log.Error($"Trying to remove proxy for event {key} when there is nothing registered.");
245 event_cb_count[key]--;
248 private static object StackingChangedEvtKey = new object();
249 /// <summary>Object stacking was changed.
250 /// (Since EFL 1.22)</summary>
251 public event EventHandler StackingChangedEvt
255 string key = "_EFL_GFX_ENTITY_EVENT_STACKING_CHANGED";
256 if (AddNativeEventHandler(efl.Libs.Efl, key, this.evt_StackingChangedEvt_delegate)) {
257 eventHandlers.AddHandler(StackingChangedEvtKey , value);
259 Eina.Log.Error($"Error adding proxy for event {key}");
264 string key = "_EFL_GFX_ENTITY_EVENT_STACKING_CHANGED";
265 if (RemoveNativeEventHandler(key, this.evt_StackingChangedEvt_delegate)) {
266 eventHandlers.RemoveHandler(StackingChangedEvtKey , value);
268 Eina.Log.Error($"Error removing proxy for event {key}");
272 ///<summary>Method to raise event StackingChangedEvt.</summary>
273 public void On_StackingChangedEvt(EventArgs e)
277 evt = (EventHandler)eventHandlers[StackingChangedEvtKey];
279 evt?.Invoke(this, e);
281 Efl.EventCb evt_StackingChangedEvt_delegate;
282 private void on_StackingChangedEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
284 EventArgs args = EventArgs.Empty;
286 On_StackingChangedEvt(args);
287 } catch (Exception e) {
288 Eina.Log.Error(e.ToString());
289 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
293 ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
294 void RegisterEventProxies()
296 evt_StackingChangedEvt_delegate = new Efl.EventCb(on_StackingChangedEvt_NativeCallback);
298 /// <summary>Retrieves the layer of its canvas that the given object is part of.
299 /// See also <see cref="Efl.Gfx.IStack.SetLayer"/>
300 /// (Since EFL 1.22)</summary>
301 /// <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>
302 public short GetLayer() {
303 var _ret_var = Efl.Gfx.IStackNativeInherit.efl_gfx_stack_layer_get_ptr.Value.Delegate(this.NativeHandle);
304 Eina.Error.RaiseIfUnhandledException();
307 /// <summary>Sets the layer of its canvas that the given object will be part of.
308 /// 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.
310 /// This is a low-level function, which you'd be using when something should be always on top, for example.
312 /// 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.
314 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>
315 /// (Since EFL 1.22)</summary>
316 /// <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>
317 /// <returns></returns>
318 public void SetLayer( short l) {
319 Efl.Gfx.IStackNativeInherit.efl_gfx_stack_layer_set_ptr.Value.Delegate(this.NativeHandle, l);
320 Eina.Error.RaiseIfUnhandledException();
322 /// <summary>Get the Evas object stacked right below <c>obj</c>
323 /// This function will traverse layers in its search, if there are objects on layers below the one <c>obj</c> is placed at.
325 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>, <see cref="Efl.Gfx.IStack.SetLayer"/> and <see cref="Efl.Gfx.IStack.GetBelow"/>
326 /// (Since EFL 1.22)</summary>
327 /// <returns>The <see cref="Efl.Gfx.IStack"/> object directly below <c>obj</c>, if any, or <c>null</c>, if none.</returns>
328 public Efl.Gfx.IStack GetBelow() {
329 var _ret_var = Efl.Gfx.IStackNativeInherit.efl_gfx_stack_below_get_ptr.Value.Delegate(this.NativeHandle);
330 Eina.Error.RaiseIfUnhandledException();
333 /// <summary>Get the Evas object stacked right above <c>obj</c>
334 /// This function will traverse layers in its search, if there are objects on layers above the one <c>obj</c> is placed at.
336 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>, <see cref="Efl.Gfx.IStack.SetLayer"/> and <see cref="Efl.Gfx.IStack.GetBelow"/>
337 /// (Since EFL 1.22)</summary>
338 /// <returns>The <see cref="Efl.Gfx.IStack"/> object directly below <c>obj</c>, if any, or <c>null</c>, if none.</returns>
339 public Efl.Gfx.IStack GetAbove() {
340 var _ret_var = Efl.Gfx.IStackNativeInherit.efl_gfx_stack_above_get_ptr.Value.Delegate(this.NativeHandle);
341 Eina.Error.RaiseIfUnhandledException();
344 /// <summary>Stack <c>obj</c> immediately <c>below</c>
345 /// 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.
347 /// Its intended to be used with objects belonging to the same layer in a given canvas, otherwise it will fail (and accomplish nothing).
349 /// 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.
351 /// Similarly, if <c>obj</c> is not a member of a smart object, <c>below</c> must not be either.
353 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>, <see cref="Efl.Gfx.IStack.SetLayer"/> and <see cref="Efl.Gfx.IStack.StackBelow"/>
354 /// (Since EFL 1.22)</summary>
355 /// <param name="below">The object below which to stack</param>
356 /// <returns></returns>
357 public void StackBelow( Efl.Gfx.IStack below) {
358 Efl.Gfx.IStackNativeInherit.efl_gfx_stack_below_ptr.Value.Delegate(this.NativeHandle, below);
359 Eina.Error.RaiseIfUnhandledException();
361 /// <summary>Raise <c>obj</c> to the top of its layer.
362 /// <c>obj</c> will, then, be the highest one in the layer it belongs to. Object on other layers won't get touched.
364 /// See also <see cref="Efl.Gfx.IStack.StackAbove"/>, <see cref="Efl.Gfx.IStack.StackBelow"/> and <see cref="Efl.Gfx.IStack.LowerToBottom"/>
365 /// (Since EFL 1.22)</summary>
366 /// <returns></returns>
367 public void RaiseToTop() {
368 Efl.Gfx.IStackNativeInherit.efl_gfx_stack_raise_to_top_ptr.Value.Delegate(this.NativeHandle);
369 Eina.Error.RaiseIfUnhandledException();
371 /// <summary>Stack <c>obj</c> immediately <c>above</c>
372 /// 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.
374 /// Its intended to be used with objects belonging to the same layer in a given canvas, otherwise it will fail (and accomplish nothing).
376 /// 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.
378 /// Similarly, if <c>obj</c> is not a member of a smart object, <c>above</c> must not be either.
380 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>, <see cref="Efl.Gfx.IStack.SetLayer"/> and <see cref="Efl.Gfx.IStack.StackBelow"/>
381 /// (Since EFL 1.22)</summary>
382 /// <param name="above">The object above which to stack</param>
383 /// <returns></returns>
384 public void StackAbove( Efl.Gfx.IStack above) {
385 Efl.Gfx.IStackNativeInherit.efl_gfx_stack_above_ptr.Value.Delegate(this.NativeHandle, above);
386 Eina.Error.RaiseIfUnhandledException();
388 /// <summary>Lower <c>obj</c> to the bottom of its layer.
389 /// <c>obj</c> will, then, be the lowest one in the layer it belongs to. Objects on other layers won't get touched.
391 /// See also <see cref="Efl.Gfx.IStack.StackAbove"/>, <see cref="Efl.Gfx.IStack.StackBelow"/> and <see cref="Efl.Gfx.IStack.RaiseToTop"/>
392 /// (Since EFL 1.22)</summary>
393 /// <returns></returns>
394 public void LowerToBottom() {
395 Efl.Gfx.IStackNativeInherit.efl_gfx_stack_lower_to_bottom_ptr.Value.Delegate(this.NativeHandle);
396 Eina.Error.RaiseIfUnhandledException();
398 /// <summary>Retrieves the layer of its canvas that the given object is part of.
399 /// See also <see cref="Efl.Gfx.IStack.SetLayer"/>
400 /// (Since EFL 1.22)</summary>
401 /// <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>
403 get { return GetLayer(); }
404 set { SetLayer( value); }
406 /// <summary>Get the Evas object stacked right below <c>obj</c>
407 /// This function will traverse layers in its search, if there are objects on layers below the one <c>obj</c> is placed at.
409 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>, <see cref="Efl.Gfx.IStack.SetLayer"/> and <see cref="Efl.Gfx.IStack.GetBelow"/>
410 /// (Since EFL 1.22)</summary>
411 /// <value>The <see cref="Efl.Gfx.IStack"/> object directly below <c>obj</c>, if any, or <c>null</c>, if none.</value>
412 public Efl.Gfx.IStack Below {
413 get { return GetBelow(); }
415 /// <summary>Get the Evas object stacked right above <c>obj</c>
416 /// This function will traverse layers in its search, if there are objects on layers above the one <c>obj</c> is placed at.
418 /// See also <see cref="Efl.Gfx.IStack.GetLayer"/>, <see cref="Efl.Gfx.IStack.SetLayer"/> and <see cref="Efl.Gfx.IStack.GetBelow"/>
419 /// (Since EFL 1.22)</summary>
420 /// <value>The <see cref="Efl.Gfx.IStack"/> object directly below <c>obj</c>, if any, or <c>null</c>, if none.</value>
421 public Efl.Gfx.IStack Above {
422 get { return GetAbove(); }
424 private static IntPtr GetEflClassStatic()
426 return Efl.Gfx.IStackConcrete.efl_gfx_stack_interface_get();
429 public class IStackNativeInherit : Efl.Eo.NativeClass{
430 public static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Efl);
431 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
433 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
434 var methods = Efl.Eo.Globals.GetUserMethods(type);
435 if (efl_gfx_stack_layer_get_static_delegate == null)
436 efl_gfx_stack_layer_get_static_delegate = new efl_gfx_stack_layer_get_delegate(layer_get);
437 if (methods.FirstOrDefault(m => m.Name == "GetLayer") != null)
438 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)});
439 if (efl_gfx_stack_layer_set_static_delegate == null)
440 efl_gfx_stack_layer_set_static_delegate = new efl_gfx_stack_layer_set_delegate(layer_set);
441 if (methods.FirstOrDefault(m => m.Name == "SetLayer") != null)
442 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)});
443 if (efl_gfx_stack_below_get_static_delegate == null)
444 efl_gfx_stack_below_get_static_delegate = new efl_gfx_stack_below_get_delegate(below_get);
445 if (methods.FirstOrDefault(m => m.Name == "GetBelow") != null)
446 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)});
447 if (efl_gfx_stack_above_get_static_delegate == null)
448 efl_gfx_stack_above_get_static_delegate = new efl_gfx_stack_above_get_delegate(above_get);
449 if (methods.FirstOrDefault(m => m.Name == "GetAbove") != null)
450 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)});
451 if (efl_gfx_stack_below_static_delegate == null)
452 efl_gfx_stack_below_static_delegate = new efl_gfx_stack_below_delegate(stack_below);
453 if (methods.FirstOrDefault(m => m.Name == "StackBelow") != null)
454 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)});
455 if (efl_gfx_stack_raise_to_top_static_delegate == null)
456 efl_gfx_stack_raise_to_top_static_delegate = new efl_gfx_stack_raise_to_top_delegate(raise_to_top);
457 if (methods.FirstOrDefault(m => m.Name == "RaiseToTop") != null)
458 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)});
459 if (efl_gfx_stack_above_static_delegate == null)
460 efl_gfx_stack_above_static_delegate = new efl_gfx_stack_above_delegate(stack_above);
461 if (methods.FirstOrDefault(m => m.Name == "StackAbove") != null)
462 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)});
463 if (efl_gfx_stack_lower_to_bottom_static_delegate == null)
464 efl_gfx_stack_lower_to_bottom_static_delegate = new efl_gfx_stack_lower_to_bottom_delegate(lower_to_bottom);
465 if (methods.FirstOrDefault(m => m.Name == "LowerToBottom") != null)
466 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)});
469 public override IntPtr GetEflClass()
471 return Efl.Gfx.IStackConcrete.efl_gfx_stack_interface_get();
473 public static IntPtr GetEflClassStatic()
475 return Efl.Gfx.IStackConcrete.efl_gfx_stack_interface_get();
479 private delegate short efl_gfx_stack_layer_get_delegate(System.IntPtr obj, System.IntPtr pd);
482 public delegate short efl_gfx_stack_layer_get_api_delegate(System.IntPtr obj);
483 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");
484 private static short layer_get(System.IntPtr obj, System.IntPtr pd)
486 Eina.Log.Debug("function efl_gfx_stack_layer_get was called");
487 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
488 if(wrapper != null) {
489 short _ret_var = default(short);
491 _ret_var = ((IStack)wrapper).GetLayer();
492 } catch (Exception e) {
493 Eina.Log.Warning($"Callback error: {e.ToString()}");
494 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
498 return efl_gfx_stack_layer_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
501 private static efl_gfx_stack_layer_get_delegate efl_gfx_stack_layer_get_static_delegate;
504 private delegate void efl_gfx_stack_layer_set_delegate(System.IntPtr obj, System.IntPtr pd, short l);
507 public delegate void efl_gfx_stack_layer_set_api_delegate(System.IntPtr obj, short l);
508 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");
509 private static void layer_set(System.IntPtr obj, System.IntPtr pd, short l)
511 Eina.Log.Debug("function efl_gfx_stack_layer_set was called");
512 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
513 if(wrapper != null) {
516 ((IStack)wrapper).SetLayer( l);
517 } catch (Exception e) {
518 Eina.Log.Warning($"Callback error: {e.ToString()}");
519 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
522 efl_gfx_stack_layer_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), l);
525 private static efl_gfx_stack_layer_set_delegate efl_gfx_stack_layer_set_static_delegate;
528 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IStackConcrete, Efl.Eo.NonOwnTag>))] private delegate Efl.Gfx.IStack efl_gfx_stack_below_get_delegate(System.IntPtr obj, System.IntPtr pd);
531 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IStackConcrete, Efl.Eo.NonOwnTag>))] public delegate Efl.Gfx.IStack efl_gfx_stack_below_get_api_delegate(System.IntPtr obj);
532 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");
533 private static Efl.Gfx.IStack below_get(System.IntPtr obj, System.IntPtr pd)
535 Eina.Log.Debug("function efl_gfx_stack_below_get was called");
536 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
537 if(wrapper != null) {
538 Efl.Gfx.IStack _ret_var = default(Efl.Gfx.IStack);
540 _ret_var = ((IStack)wrapper).GetBelow();
541 } catch (Exception e) {
542 Eina.Log.Warning($"Callback error: {e.ToString()}");
543 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
547 return efl_gfx_stack_below_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
550 private static efl_gfx_stack_below_get_delegate efl_gfx_stack_below_get_static_delegate;
553 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IStackConcrete, Efl.Eo.NonOwnTag>))] private delegate Efl.Gfx.IStack efl_gfx_stack_above_get_delegate(System.IntPtr obj, System.IntPtr pd);
556 [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IStackConcrete, Efl.Eo.NonOwnTag>))] public delegate Efl.Gfx.IStack efl_gfx_stack_above_get_api_delegate(System.IntPtr obj);
557 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");
558 private static Efl.Gfx.IStack above_get(System.IntPtr obj, System.IntPtr pd)
560 Eina.Log.Debug("function efl_gfx_stack_above_get was called");
561 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
562 if(wrapper != null) {
563 Efl.Gfx.IStack _ret_var = default(Efl.Gfx.IStack);
565 _ret_var = ((IStack)wrapper).GetAbove();
566 } catch (Exception e) {
567 Eina.Log.Warning($"Callback error: {e.ToString()}");
568 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
572 return efl_gfx_stack_above_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
575 private static efl_gfx_stack_above_get_delegate efl_gfx_stack_above_get_static_delegate;
578 private delegate void efl_gfx_stack_below_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IStackConcrete, Efl.Eo.NonOwnTag>))] Efl.Gfx.IStack below);
581 public delegate void efl_gfx_stack_below_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IStackConcrete, Efl.Eo.NonOwnTag>))] Efl.Gfx.IStack below);
582 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");
583 private static void stack_below(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.IStack below)
585 Eina.Log.Debug("function efl_gfx_stack_below was called");
586 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
587 if(wrapper != null) {
590 ((IStack)wrapper).StackBelow( below);
591 } catch (Exception e) {
592 Eina.Log.Warning($"Callback error: {e.ToString()}");
593 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
596 efl_gfx_stack_below_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), below);
599 private static efl_gfx_stack_below_delegate efl_gfx_stack_below_static_delegate;
602 private delegate void efl_gfx_stack_raise_to_top_delegate(System.IntPtr obj, System.IntPtr pd);
605 public delegate void efl_gfx_stack_raise_to_top_api_delegate(System.IntPtr obj);
606 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");
607 private static void raise_to_top(System.IntPtr obj, System.IntPtr pd)
609 Eina.Log.Debug("function efl_gfx_stack_raise_to_top was called");
610 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
611 if(wrapper != null) {
614 ((IStack)wrapper).RaiseToTop();
615 } catch (Exception e) {
616 Eina.Log.Warning($"Callback error: {e.ToString()}");
617 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
620 efl_gfx_stack_raise_to_top_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
623 private static efl_gfx_stack_raise_to_top_delegate efl_gfx_stack_raise_to_top_static_delegate;
626 private delegate void efl_gfx_stack_above_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IStackConcrete, Efl.Eo.NonOwnTag>))] Efl.Gfx.IStack above);
629 public delegate void efl_gfx_stack_above_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Gfx.IStackConcrete, Efl.Eo.NonOwnTag>))] Efl.Gfx.IStack above);
630 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");
631 private static void stack_above(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.IStack above)
633 Eina.Log.Debug("function efl_gfx_stack_above was called");
634 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
635 if(wrapper != null) {
638 ((IStack)wrapper).StackAbove( above);
639 } catch (Exception e) {
640 Eina.Log.Warning($"Callback error: {e.ToString()}");
641 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
644 efl_gfx_stack_above_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), above);
647 private static efl_gfx_stack_above_delegate efl_gfx_stack_above_static_delegate;
650 private delegate void efl_gfx_stack_lower_to_bottom_delegate(System.IntPtr obj, System.IntPtr pd);
653 public delegate void efl_gfx_stack_lower_to_bottom_api_delegate(System.IntPtr obj);
654 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");
655 private static void lower_to_bottom(System.IntPtr obj, System.IntPtr pd)
657 Eina.Log.Debug("function efl_gfx_stack_lower_to_bottom was called");
658 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
659 if(wrapper != null) {
662 ((IStack)wrapper).LowerToBottom();
663 } catch (Exception e) {
664 Eina.Log.Warning($"Callback error: {e.ToString()}");
665 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
668 efl_gfx_stack_lower_to_bottom_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
671 private static efl_gfx_stack_lower_to_bottom_delegate efl_gfx_stack_lower_to_bottom_static_delegate;