[EflSharp] Separate efl and Circle cs files and Update cs files (#786)
[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.ComponentModel;
7 namespace Efl { namespace Gfx { 
8 public partial class Constants {
9     public static readonly short StackLayerMin = -32768;
10 }
11 } } 
12 namespace Efl { namespace Gfx { 
13 public partial class Constants {
14     public static readonly short StackLayerMax = 32767;
15 }
16 } } 
17 namespace Efl { namespace Gfx { 
18 /// <summary>Efl graphics stack interface
19 /// (Since EFL 1.22)</summary>
20 [IStackNativeInherit]
21 public interface IStack : 
22     Efl.Eo.IWrapper, IDisposable
23 {
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>
28 short GetLayer();
29     /// <summary>Sets the layer of its canvas that the given object will be part of.
30 /// 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.
31 /// 
32 /// This is a low-level function, which you&apos;d be using when something should be always on top, for example.
33 /// 
34 /// 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.
35 /// 
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.
43 /// 
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.
50 /// 
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&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.
57 /// 
58 /// Its intended to be used with objects belonging to the same layer in a given canvas, otherwise it will fail (and accomplish nothing).
59 /// 
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.
61 /// 
62 /// Similarly, if <c>obj</c> is not a member of a smart object, <c>below</c> must not be either.
63 /// 
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&apos;t get touched.
71 /// 
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>
75 void RaiseToTop();
76     /// <summary>Stack <c>obj</c> immediately <c>above</c>
77 /// 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.
78 /// 
79 /// Its intended to be used with objects belonging to the same layer in a given canvas, otherwise it will fail (and accomplish nothing).
80 /// 
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.
82 /// 
83 /// Similarly, if <c>obj</c> is not a member of a smart object, <c>above</c> must not be either.
84 /// 
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&apos;t get touched.
92 /// 
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>
96 void LowerToBottom();
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>
104     short Layer {
105         get ;
106         set ;
107     }
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.
110 /// 
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 {
115         get ;
116     }
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.
119 /// 
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 {
124         get ;
125     }
126 }
127 /// <summary>Efl graphics stack interface
128 /// (Since EFL 1.22)</summary>
129 sealed public class IStackConcrete : 
130
131 IStack
132     
133 {
134     ///<summary>Pointer to the native class description.</summary>
135     public System.IntPtr NativeClass {
136         get {
137             if (((object)this).GetType() == typeof (IStackConcrete))
138                 return Efl.Gfx.IStackNativeInherit.GetEflClassStatic();
139             else
140                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
141         }
142     }
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; }
148     }
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)
153     {
154         handle = raw;
155         RegisterEventProxies();
156     }
157     ///<summary>Destructor.</summary>
158     ~IStackConcrete()
159     {
160         Dispose(false);
161     }
162     ///<summary>Releases the underlying native instance.</summary>
163     void Dispose(bool disposing)
164     {
165         if (handle != System.IntPtr.Zero) {
166             Efl.Eo.Globals.efl_unref(handle);
167             handle = System.IntPtr.Zero;
168         }
169     }
170     ///<summary>Releases the underlying native instance.</summary>
171     public void Dispose()
172     {
173         Dispose(true);
174         GC.SuppressFinalize(this);
175     }
176     ///<summary>Verifies if the given object is equal to this one.</summary>
177     public override bool Equals(object obj)
178     {
179         var other = obj as Efl.Object;
180         if (other == null)
181             return false;
182         return this.NativeHandle == other.NativeHandle;
183     }
184     ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
185     public override int GetHashCode()
186     {
187         return this.NativeHandle.ToInt32();
188     }
189     ///<summary>Turns the native pointer into a string representation.</summary>
190     public override String ToString()
191     {
192         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
193     }
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) {
202         int event_count = 0;
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}");
209                 return false;
210             }
211              bool result = Efl.Eo.Globals.efl_event_callback_priority_add(handle, desc, 0, evt_delegate, System.IntPtr.Zero);
212             if (!result) {
213                 Eina.Log.Error($"Failed to add event proxy for event {key}");
214                 return false;
215             }
216             Eina.Error.RaiseIfUnhandledException();
217         } 
218         event_cb_count[key]++;
219         return true;
220     }
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) {
226         int event_count = 0;
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}");
233                 return false;
234             }
235             bool result = Efl.Eo.Globals.efl_event_callback_del(handle, desc, evt_delegate, System.IntPtr.Zero);
236             if (!result) {
237                 Eina.Log.Error($"Failed to remove event proxy for event {key}");
238                 return false;
239             }
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.");
243             return false;
244         } 
245         event_cb_count[key]--;
246         return true;
247     }
248 private static object StackingChangedEvtKey = new object();
249     /// <summary>Object stacking was changed.
250     /// (Since EFL 1.22)</summary>
251     public event EventHandler StackingChangedEvt
252     {
253         add {
254             lock (eventLock) {
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);
258                 } else
259                     Eina.Log.Error($"Error adding proxy for event {key}");
260             }
261         }
262         remove {
263             lock (eventLock) {
264                 string key = "_EFL_GFX_ENTITY_EVENT_STACKING_CHANGED";
265                 if (RemoveNativeEventHandler(key, this.evt_StackingChangedEvt_delegate)) { 
266                     eventHandlers.RemoveHandler(StackingChangedEvtKey , value);
267                 } else
268                     Eina.Log.Error($"Error removing proxy for event {key}");
269             }
270         }
271     }
272     ///<summary>Method to raise event StackingChangedEvt.</summary>
273     public void On_StackingChangedEvt(EventArgs e)
274     {
275         EventHandler evt;
276         lock (eventLock) {
277         evt = (EventHandler)eventHandlers[StackingChangedEvtKey];
278         }
279         evt?.Invoke(this, e);
280     }
281     Efl.EventCb evt_StackingChangedEvt_delegate;
282     private void on_StackingChangedEvt_NativeCallback(System.IntPtr data, ref Efl.Event.NativeStruct evt)
283     {
284         EventArgs args = EventArgs.Empty;
285         try {
286             On_StackingChangedEvt(args);
287         } catch (Exception e) {
288             Eina.Log.Error(e.ToString());
289             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
290         }
291     }
292
293     ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
294      void RegisterEventProxies()
295     {
296         evt_StackingChangedEvt_delegate = new Efl.EventCb(on_StackingChangedEvt_NativeCallback);
297     }
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();
305         return _ret_var;
306  }
307     /// <summary>Sets the layer of its canvas that the given object will be part of.
308     /// 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.
309     /// 
310     /// This is a low-level function, which you&apos;d be using when something should be always on top, for example.
311     /// 
312     /// 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.
313     /// 
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();
321                          }
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.
324     /// 
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();
331         return _ret_var;
332  }
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.
335     /// 
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();
342         return _ret_var;
343  }
344     /// <summary>Stack <c>obj</c> immediately <c>below</c>
345     /// 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.
346     /// 
347     /// Its intended to be used with objects belonging to the same layer in a given canvas, otherwise it will fail (and accomplish nothing).
348     /// 
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.
350     /// 
351     /// Similarly, if <c>obj</c> is not a member of a smart object, <c>below</c> must not be either.
352     /// 
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();
360                          }
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&apos;t get touched.
363     /// 
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();
370          }
371     /// <summary>Stack <c>obj</c> immediately <c>above</c>
372     /// 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.
373     /// 
374     /// Its intended to be used with objects belonging to the same layer in a given canvas, otherwise it will fail (and accomplish nothing).
375     /// 
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.
377     /// 
378     /// Similarly, if <c>obj</c> is not a member of a smart object, <c>above</c> must not be either.
379     /// 
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();
387                          }
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&apos;t get touched.
390     /// 
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();
397          }
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>
402     public short Layer {
403         get { return GetLayer(); }
404         set { SetLayer( value); }
405     }
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.
408 /// 
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(); }
414     }
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.
417 /// 
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(); }
423     }
424     private static IntPtr GetEflClassStatic()
425     {
426         return Efl.Gfx.IStackConcrete.efl_gfx_stack_interface_get();
427     }
428 }
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)
432     {
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)});
467         return descs;
468     }
469     public override IntPtr GetEflClass()
470     {
471         return Efl.Gfx.IStackConcrete.efl_gfx_stack_interface_get();
472     }
473     public static  IntPtr GetEflClassStatic()
474     {
475         return Efl.Gfx.IStackConcrete.efl_gfx_stack_interface_get();
476     }
477
478
479      private delegate short efl_gfx_stack_layer_get_delegate(System.IntPtr obj, System.IntPtr pd);
480
481
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)
485     {
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);
490             try {
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);
495             }
496         return _ret_var;
497         } else {
498             return efl_gfx_stack_layer_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
499         }
500     }
501     private static efl_gfx_stack_layer_get_delegate efl_gfx_stack_layer_get_static_delegate;
502
503
504      private delegate void efl_gfx_stack_layer_set_delegate(System.IntPtr obj, System.IntPtr pd,   short l);
505
506
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)
510     {
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) {
514                                                 
515             try {
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);
520             }
521                                 } else {
522             efl_gfx_stack_layer_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  l);
523         }
524     }
525     private static efl_gfx_stack_layer_set_delegate efl_gfx_stack_layer_set_static_delegate;
526
527
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);
529
530
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)
534     {
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);
539             try {
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);
544             }
545         return _ret_var;
546         } else {
547             return efl_gfx_stack_below_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
548         }
549     }
550     private static efl_gfx_stack_below_get_delegate efl_gfx_stack_below_get_static_delegate;
551
552
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);
554
555
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)
559     {
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);
564             try {
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);
569             }
570         return _ret_var;
571         } else {
572             return efl_gfx_stack_above_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
573         }
574     }
575     private static efl_gfx_stack_above_get_delegate efl_gfx_stack_above_get_static_delegate;
576
577
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);
579
580
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)
584     {
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) {
588                                                 
589             try {
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);
594             }
595                                 } else {
596             efl_gfx_stack_below_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  below);
597         }
598     }
599     private static efl_gfx_stack_below_delegate efl_gfx_stack_below_static_delegate;
600
601
602      private delegate void efl_gfx_stack_raise_to_top_delegate(System.IntPtr obj, System.IntPtr pd);
603
604
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)
608     {
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) {
612                         
613             try {
614                 ((IStack)wrapper).RaiseToTop();
615             } catch (Exception e) {
616                 Eina.Log.Warning($"Callback error: {e.ToString()}");
617                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
618             }
619                 } else {
620             efl_gfx_stack_raise_to_top_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
621         }
622     }
623     private static efl_gfx_stack_raise_to_top_delegate efl_gfx_stack_raise_to_top_static_delegate;
624
625
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);
627
628
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)
632     {
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) {
636                                                 
637             try {
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);
642             }
643                                 } else {
644             efl_gfx_stack_above_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  above);
645         }
646     }
647     private static efl_gfx_stack_above_delegate efl_gfx_stack_above_static_delegate;
648
649
650      private delegate void efl_gfx_stack_lower_to_bottom_delegate(System.IntPtr obj, System.IntPtr pd);
651
652
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)
656     {
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) {
660                         
661             try {
662                 ((IStack)wrapper).LowerToBottom();
663             } catch (Exception e) {
664                 Eina.Log.Warning($"Callback error: {e.ToString()}");
665                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
666             }
667                 } else {
668             efl_gfx_stack_lower_to_bottom_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
669         }
670     }
671     private static efl_gfx_stack_lower_to_bottom_delegate efl_gfx_stack_lower_to_bottom_static_delegate;
672 }
673 } }