[EflSharp] Update Circle and efl cs files (#819)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_gfx_stack.eo.cs
1 #pragma warning disable CS1591
2 using System;
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
5 using System.Linq;
6 using System.Threading;
7 using System.ComponentModel;
8 namespace Efl {
9
10 namespace Gfx {
11
12 public partial class Constants
13 {
14     public static readonly short StackLayerMin = -32768;
15 }
16 }
17
18 }
19
20 namespace Efl {
21
22 namespace Gfx {
23
24 public partial class Constants
25 {
26     public static readonly short StackLayerMax = 32767;
27 }
28 }
29
30 }
31
32 namespace Efl {
33
34 namespace Gfx {
35
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
41 {
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>
46 short GetLayer();
47     /// <summary>Sets the layer of its canvas that the given object will be part of.
48 /// If you don&apos;t use this function, you&apos;ll be dealing with an unique layer of objects (the default one). Additional layers are handy when you don&apos;t want a set of objects to interfere with another set with regard to stacking. Two layers are completely disjoint in that matter.
49 /// 
50 /// This is a low-level function, which you&apos;d be using when something should be always on top, for example.
51 /// 
52 /// Warning: Don&apos;t change the layer of smart objects&apos; children. Smart objects have a layer of their own, which should contain all their child objects.
53 /// 
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.
60 /// 
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.
67 /// 
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&apos;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.
74 /// 
75 /// Its intended to be used with objects belonging to the same layer in a given canvas, otherwise it will fail (and accomplish nothing).
76 /// 
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.
78 /// 
79 /// Similarly, if <c>obj</c> is not a member of a smart object, <c>below</c> must not be either.
80 /// 
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&apos;t get touched.
87 /// 
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>
90 void RaiseToTop();
91     /// <summary>Stack <c>obj</c> immediately <c>above</c>
92 /// Objects, in a given canvas, are stacked in the order they&apos;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.
93 /// 
94 /// Its intended to be used with objects belonging to the same layer in a given canvas, otherwise it will fail (and accomplish nothing).
95 /// 
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.
97 /// 
98 /// Similarly, if <c>obj</c> is not a member of a smart object, <c>above</c> must not be either.
99 /// 
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&apos;t get touched.
106 /// 
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>
117     short Layer {
118         get ;
119         set ;
120     }
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.
123 /// 
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 {
128         get ;
129     }
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.
132 /// 
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 {
137         get ;
138     }
139 }
140 /// <summary>Efl graphics stack interface
141 /// (Since EFL 1.22)</summary>
142 sealed public class IStackConcrete : 
143
144 IStack
145     
146 {
147     ///<summary>Pointer to the native class description.</summary>
148     public System.IntPtr NativeClass
149     {
150         get
151         {
152             if (((object)this).GetType() == typeof(IStackConcrete))
153             {
154                 return GetEflClassStatic();
155             }
156             else
157             {
158                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
159             }
160         }
161     }
162
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
168     {
169         get { return handle; }
170     }
171
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)
177     {
178         handle = raw;
179     }
180     ///<summary>Destructor.</summary>
181     ~IStackConcrete()
182     {
183         Dispose(false);
184     }
185
186     ///<summary>Releases the underlying native instance.</summary>
187     private void Dispose(bool disposing)
188     {
189         if (handle != System.IntPtr.Zero)
190         {
191             IntPtr h = handle;
192             handle = IntPtr.Zero;
193
194             IntPtr gcHandlePtr = IntPtr.Zero;
195             if (eoEvents.Count != 0)
196             {
197                 GCHandle gcHandle = GCHandle.Alloc(eoEvents);
198                 gcHandlePtr = GCHandle.ToIntPtr(gcHandle);
199             }
200
201             if (disposing)
202             {
203                 Efl.Eo.Globals.efl_mono_native_dispose(h, gcHandlePtr);
204             }
205             else
206             {
207                 Monitor.Enter(Efl.All.InitLock);
208                 if (Efl.All.MainLoopInitialized)
209                 {
210                     Efl.Eo.Globals.efl_mono_thread_safe_native_dispose(h, gcHandlePtr);
211                 }
212
213                 Monitor.Exit(Efl.All.InitLock);
214             }
215         }
216
217     }
218
219     ///<summary>Releases the underlying native instance.</summary>
220     public void Dispose()
221     {
222         Dispose(true);
223         GC.SuppressFinalize(this);
224     }
225
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)
230     {
231         var other = instance as Efl.Object;
232         if (other == null)
233         {
234             return false;
235         }
236         return this.NativeHandle == other.NativeHandle;
237     }
238
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()
242     {
243         return this.NativeHandle.ToInt32();
244     }
245
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()
249     {
250         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
251     }
252
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)
259     {
260         IntPtr desc = Efl.EventDescription.GetNative(lib, key);
261         if (desc == IntPtr.Zero)
262         {
263             Eina.Log.Error($"Failed to get native event {key}");
264         }
265
266         if (eoEvents.ContainsKey((desc, evtDelegate)))
267         {
268             Eina.Log.Warning($"Event proxy for event {key} already registered!");
269             return;
270         }
271
272         IntPtr evtCallerPtr = Marshal.GetFunctionPointerForDelegate(evtCaller);
273         if (!Efl.Eo.Globals.efl_event_callback_priority_add(handle, desc, 0, evtCallerPtr, IntPtr.Zero))
274         {
275             Eina.Log.Error($"Failed to add event proxy for event {key}");
276             return;
277         }
278
279         eoEvents[(desc, evtDelegate)] = (evtCallerPtr, evtCaller);
280         Eina.Error.RaiseIfUnhandledException();
281     }
282
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)
288     {
289         IntPtr desc = Efl.EventDescription.GetNative(lib, key);
290         if (desc == IntPtr.Zero)
291         {
292             Eina.Log.Error($"Failed to get native event {key}");
293             return;
294         }
295
296         var evtPair = (desc, evtDelegate);
297         if (eoEvents.TryGetValue(evtPair, out var caller))
298         {
299             if (!Efl.Eo.Globals.efl_event_callback_del(handle, desc, caller.evtCallerPtr, IntPtr.Zero))
300             {
301                 Eina.Log.Error($"Failed to remove event proxy for event {key}");
302                 return;
303             }
304
305             eoEvents.Remove(evtPair);
306             Eina.Error.RaiseIfUnhandledException();
307         }
308         else
309         {
310             Eina.Log.Error($"Trying to remove proxy for event {key} when it is nothing registered.");
311         }
312     }
313
314     /// <summary>Object stacking was changed.
315     /// (Since EFL 1.22)</summary>
316     public event EventHandler StackingChangedEvt
317     {
318         add
319         {
320             lock (eventLock)
321             {
322                 var wRef = new WeakReference(this);
323                 Efl.EventCb callerCb = (IntPtr data, ref Efl.Event.NativeStruct evt) =>
324                 {
325                     var obj = wRef.Target as Efl.Eo.IWrapper;
326                     if (obj != null)
327                     {
328                         EventArgs args = EventArgs.Empty;
329                         try
330                         {
331                             value?.Invoke(obj, args);
332                         }
333                         catch (Exception e)
334                         {
335                             Eina.Log.Error(e.ToString());
336                             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
337                         }
338                     }
339                 };
340
341                 string key = "_EFL_GFX_ENTITY_EVENT_STACKING_CHANGED";
342                 AddNativeEventHandler(efl.Libs.Efl, key, callerCb, value);
343             }
344         }
345
346         remove
347         {
348             lock (eventLock)
349             {
350                 string key = "_EFL_GFX_ENTITY_EVENT_STACKING_CHANGED";
351                 RemoveNativeEventHandler(efl.Libs.Efl, key, value);
352             }
353         }
354     }
355     ///<summary>Method to raise event StackingChangedEvt.</summary>
356     public void OnStackingChangedEvt(EventArgs e)
357     {
358         var key = "_EFL_GFX_ENTITY_EVENT_STACKING_CHANGED";
359         IntPtr desc = Efl.EventDescription.GetNative(efl.Libs.Efl, key);
360         if (desc == IntPtr.Zero)
361         {
362             Eina.Log.Error($"Failed to get native event {key}");
363             return;
364         }
365
366         Efl.Eo.Globals.efl_event_callback_call(this.NativeHandle, desc, IntPtr.Zero);
367     }
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();
375         return _ret_var;
376  }
377     /// <summary>Sets the layer of its canvas that the given object will be part of.
378     /// If you don&apos;t use this function, you&apos;ll be dealing with an unique layer of objects (the default one). Additional layers are handy when you don&apos;t want a set of objects to interfere with another set with regard to stacking. Two layers are completely disjoint in that matter.
379     /// 
380     /// This is a low-level function, which you&apos;d be using when something should be always on top, for example.
381     /// 
382     /// Warning: Don&apos;t change the layer of smart objects&apos; children. Smart objects have a layer of their own, which should contain all their child objects.
383     /// 
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();
390                          }
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.
393     /// 
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();
400         return _ret_var;
401  }
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.
404     /// 
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();
411         return _ret_var;
412  }
413     /// <summary>Stack <c>obj</c> immediately <c>below</c>
414     /// Objects, in a given canvas, are stacked in the order they&apos;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.
415     /// 
416     /// Its intended to be used with objects belonging to the same layer in a given canvas, otherwise it will fail (and accomplish nothing).
417     /// 
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.
419     /// 
420     /// Similarly, if <c>obj</c> is not a member of a smart object, <c>below</c> must not be either.
421     /// 
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();
428                          }
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&apos;t get touched.
431     /// 
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();
437          }
438     /// <summary>Stack <c>obj</c> immediately <c>above</c>
439     /// Objects, in a given canvas, are stacked in the order they&apos;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.
440     /// 
441     /// Its intended to be used with objects belonging to the same layer in a given canvas, otherwise it will fail (and accomplish nothing).
442     /// 
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.
444     /// 
445     /// Similarly, if <c>obj</c> is not a member of a smart object, <c>above</c> must not be either.
446     /// 
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();
453                          }
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&apos;t get touched.
456     /// 
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();
462          }
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>
467     public short Layer {
468         get { return GetLayer(); }
469         set { SetLayer(value); }
470     }
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.
473 /// 
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(); }
479     }
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.
482 /// 
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(); }
488     }
489     private static IntPtr GetEflClassStatic()
490     {
491         return Efl.Gfx.IStackConcrete.efl_gfx_stack_interface_get();
492     }
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
496     {
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)
501         {
502             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
503             var methods = Efl.Eo.Globals.GetUserMethods(type);
504
505             if (efl_gfx_stack_layer_get_static_delegate == null)
506             {
507                 efl_gfx_stack_layer_get_static_delegate = new efl_gfx_stack_layer_get_delegate(layer_get);
508             }
509
510             if (methods.FirstOrDefault(m => m.Name == "GetLayer") != null)
511             {
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) });
513             }
514
515             if (efl_gfx_stack_layer_set_static_delegate == null)
516             {
517                 efl_gfx_stack_layer_set_static_delegate = new efl_gfx_stack_layer_set_delegate(layer_set);
518             }
519
520             if (methods.FirstOrDefault(m => m.Name == "SetLayer") != null)
521             {
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) });
523             }
524
525             if (efl_gfx_stack_below_get_static_delegate == null)
526             {
527                 efl_gfx_stack_below_get_static_delegate = new efl_gfx_stack_below_get_delegate(below_get);
528             }
529
530             if (methods.FirstOrDefault(m => m.Name == "GetBelow") != null)
531             {
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) });
533             }
534
535             if (efl_gfx_stack_above_get_static_delegate == null)
536             {
537                 efl_gfx_stack_above_get_static_delegate = new efl_gfx_stack_above_get_delegate(above_get);
538             }
539
540             if (methods.FirstOrDefault(m => m.Name == "GetAbove") != null)
541             {
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) });
543             }
544
545             if (efl_gfx_stack_below_static_delegate == null)
546             {
547                 efl_gfx_stack_below_static_delegate = new efl_gfx_stack_below_delegate(stack_below);
548             }
549
550             if (methods.FirstOrDefault(m => m.Name == "StackBelow") != null)
551             {
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) });
553             }
554
555             if (efl_gfx_stack_raise_to_top_static_delegate == null)
556             {
557                 efl_gfx_stack_raise_to_top_static_delegate = new efl_gfx_stack_raise_to_top_delegate(raise_to_top);
558             }
559
560             if (methods.FirstOrDefault(m => m.Name == "RaiseToTop") != null)
561             {
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) });
563             }
564
565             if (efl_gfx_stack_above_static_delegate == null)
566             {
567                 efl_gfx_stack_above_static_delegate = new efl_gfx_stack_above_delegate(stack_above);
568             }
569
570             if (methods.FirstOrDefault(m => m.Name == "StackAbove") != null)
571             {
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) });
573             }
574
575             if (efl_gfx_stack_lower_to_bottom_static_delegate == null)
576             {
577                 efl_gfx_stack_lower_to_bottom_static_delegate = new efl_gfx_stack_lower_to_bottom_delegate(lower_to_bottom);
578             }
579
580             if (methods.FirstOrDefault(m => m.Name == "LowerToBottom") != null)
581             {
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) });
583             }
584
585             return descs;
586         }
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()
590         {
591             return Efl.Gfx.IStackConcrete.efl_gfx_stack_interface_get();
592         }
593
594         #pragma warning disable CA1707, SA1300, SA1600
595
596         
597         private delegate short efl_gfx_stack_layer_get_delegate(System.IntPtr obj, System.IntPtr pd);
598
599         
600         public delegate short efl_gfx_stack_layer_get_api_delegate(System.IntPtr obj);
601
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");
603
604         private static short layer_get(System.IntPtr obj, System.IntPtr pd)
605         {
606             Eina.Log.Debug("function efl_gfx_stack_layer_get was called");
607             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
608             if (wrapper != null)
609             {
610             short _ret_var = default(short);
611                 try
612                 {
613                     _ret_var = ((IStack)wrapper).GetLayer();
614                 }
615                 catch (Exception e)
616                 {
617                     Eina.Log.Warning($"Callback error: {e.ToString()}");
618                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
619                 }
620
621         return _ret_var;
622
623             }
624             else
625             {
626                 return efl_gfx_stack_layer_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
627             }
628         }
629
630         private static efl_gfx_stack_layer_get_delegate efl_gfx_stack_layer_get_static_delegate;
631
632         
633         private delegate void efl_gfx_stack_layer_set_delegate(System.IntPtr obj, System.IntPtr pd,  short l);
634
635         
636         public delegate void efl_gfx_stack_layer_set_api_delegate(System.IntPtr obj,  short l);
637
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");
639
640         private static void layer_set(System.IntPtr obj, System.IntPtr pd, short l)
641         {
642             Eina.Log.Debug("function efl_gfx_stack_layer_set was called");
643             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
644             if (wrapper != null)
645             {
646                                     
647                 try
648                 {
649                     ((IStack)wrapper).SetLayer(l);
650                 }
651                 catch (Exception e)
652                 {
653                     Eina.Log.Warning($"Callback error: {e.ToString()}");
654                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
655                 }
656
657                         
658             }
659             else
660             {
661                 efl_gfx_stack_layer_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), l);
662             }
663         }
664
665         private static efl_gfx_stack_layer_set_delegate efl_gfx_stack_layer_set_static_delegate;
666
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);
669
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);
672
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");
674
675         private static Efl.Gfx.IStack below_get(System.IntPtr obj, System.IntPtr pd)
676         {
677             Eina.Log.Debug("function efl_gfx_stack_below_get was called");
678             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
679             if (wrapper != null)
680             {
681             Efl.Gfx.IStack _ret_var = default(Efl.Gfx.IStack);
682                 try
683                 {
684                     _ret_var = ((IStack)wrapper).GetBelow();
685                 }
686                 catch (Exception e)
687                 {
688                     Eina.Log.Warning($"Callback error: {e.ToString()}");
689                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
690                 }
691
692         return _ret_var;
693
694             }
695             else
696             {
697                 return efl_gfx_stack_below_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
698             }
699         }
700
701         private static efl_gfx_stack_below_get_delegate efl_gfx_stack_below_get_static_delegate;
702
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);
705
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);
708
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");
710
711         private static Efl.Gfx.IStack above_get(System.IntPtr obj, System.IntPtr pd)
712         {
713             Eina.Log.Debug("function efl_gfx_stack_above_get was called");
714             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
715             if (wrapper != null)
716             {
717             Efl.Gfx.IStack _ret_var = default(Efl.Gfx.IStack);
718                 try
719                 {
720                     _ret_var = ((IStack)wrapper).GetAbove();
721                 }
722                 catch (Exception e)
723                 {
724                     Eina.Log.Warning($"Callback error: {e.ToString()}");
725                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
726                 }
727
728         return _ret_var;
729
730             }
731             else
732             {
733                 return efl_gfx_stack_above_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
734             }
735         }
736
737         private static efl_gfx_stack_above_get_delegate efl_gfx_stack_above_get_static_delegate;
738
739         
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);
741
742         
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);
744
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");
746
747         private static void stack_below(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.IStack below)
748         {
749             Eina.Log.Debug("function efl_gfx_stack_below was called");
750             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
751             if (wrapper != null)
752             {
753                                     
754                 try
755                 {
756                     ((IStack)wrapper).StackBelow(below);
757                 }
758                 catch (Exception e)
759                 {
760                     Eina.Log.Warning($"Callback error: {e.ToString()}");
761                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
762                 }
763
764                         
765             }
766             else
767             {
768                 efl_gfx_stack_below_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), below);
769             }
770         }
771
772         private static efl_gfx_stack_below_delegate efl_gfx_stack_below_static_delegate;
773
774         
775         private delegate void efl_gfx_stack_raise_to_top_delegate(System.IntPtr obj, System.IntPtr pd);
776
777         
778         public delegate void efl_gfx_stack_raise_to_top_api_delegate(System.IntPtr obj);
779
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");
781
782         private static void raise_to_top(System.IntPtr obj, System.IntPtr pd)
783         {
784             Eina.Log.Debug("function efl_gfx_stack_raise_to_top was called");
785             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
786             if (wrapper != null)
787             {
788             
789                 try
790                 {
791                     ((IStack)wrapper).RaiseToTop();
792                 }
793                 catch (Exception e)
794                 {
795                     Eina.Log.Warning($"Callback error: {e.ToString()}");
796                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
797                 }
798
799         
800             }
801             else
802             {
803                 efl_gfx_stack_raise_to_top_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
804             }
805         }
806
807         private static efl_gfx_stack_raise_to_top_delegate efl_gfx_stack_raise_to_top_static_delegate;
808
809         
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);
811
812         
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);
814
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");
816
817         private static void stack_above(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.IStack above)
818         {
819             Eina.Log.Debug("function efl_gfx_stack_above was called");
820             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
821             if (wrapper != null)
822             {
823                                     
824                 try
825                 {
826                     ((IStack)wrapper).StackAbove(above);
827                 }
828                 catch (Exception e)
829                 {
830                     Eina.Log.Warning($"Callback error: {e.ToString()}");
831                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
832                 }
833
834                         
835             }
836             else
837             {
838                 efl_gfx_stack_above_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), above);
839             }
840         }
841
842         private static efl_gfx_stack_above_delegate efl_gfx_stack_above_static_delegate;
843
844         
845         private delegate void efl_gfx_stack_lower_to_bottom_delegate(System.IntPtr obj, System.IntPtr pd);
846
847         
848         public delegate void efl_gfx_stack_lower_to_bottom_api_delegate(System.IntPtr obj);
849
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");
851
852         private static void lower_to_bottom(System.IntPtr obj, System.IntPtr pd)
853         {
854             Eina.Log.Debug("function efl_gfx_stack_lower_to_bottom was called");
855             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
856             if (wrapper != null)
857             {
858             
859                 try
860                 {
861                     ((IStack)wrapper).LowerToBottom();
862                 }
863                 catch (Exception e)
864                 {
865                     Eina.Log.Warning($"Callback error: {e.ToString()}");
866                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
867                 }
868
869         
870             }
871             else
872             {
873                 efl_gfx_stack_lower_to_bottom_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
874             }
875         }
876
877         private static efl_gfx_stack_lower_to_bottom_delegate efl_gfx_stack_lower_to_bottom_static_delegate;
878
879         #pragma warning restore CA1707, SA1300, SA1600
880
881 }
882 }
883 }
884
885 }
886