2 #pragma warning disable CS1591
4 using System.Runtime.InteropServices;
5 using System.Collections.Generic;
7 using System.Threading;
8 using System.ComponentModel;
13 /// <summary>Efl Cached Item interface</summary>
14 /// <remarks>This is a <b>BETA</b> class. It can be modified or removed in the future. Do not use it for product development.</remarks>
15 [Efl.Cached.IItemConcrete.NativeMethods]
16 [Efl.Eo.BindingEntity]
17 public interface IItem :
18 Efl.Eo.IWrapper, IDisposable
20 /// <summary>Get the memory size associated with an object.</summary>
21 /// <returns>Bytes of memory consumed by this object.</returns>
23 /// <summary>Get the memory size associated with an object.</summary>
24 /// <value>Bytes of memory consumed by this object.</value>
29 /// <summary>Efl Cached Item interface</summary>
30 /// <remarks>This is a <b>BETA</b> class. It can be modified or removed in the future. Do not use it for product development.</remarks>
31 sealed public class IItemConcrete :
36 /// <summary>Pointer to the native class description.</summary>
37 public override System.IntPtr NativeClass
41 if (((object)this).GetType() == typeof(IItemConcrete))
43 return GetEflClassStatic();
47 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
52 /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
53 /// Do not call this constructor directly.</summary>
54 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
55 private IItemConcrete(ConstructingHandle ch) : base(ch)
59 [System.Runtime.InteropServices.DllImport("libefl.so.1")] internal static extern System.IntPtr
60 efl_cached_item_interface_get();
61 /// <summary>Initializes a new instance of the <see cref="IItem"/> class.
62 /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
63 /// <param name="wh">The native pointer to be wrapped.</param>
64 private IItemConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
68 /// <summary>Get the memory size associated with an object.</summary>
69 /// <returns>Bytes of memory consumed by this object.</returns>
70 public uint GetMemorySize() {
71 var _ret_var = Efl.Cached.IItemConcrete.NativeMethods.efl_cached_item_memory_size_get_ptr.Value.Delegate(this.NativeHandle);
72 Eina.Error.RaiseIfUnhandledException();
75 /// <summary>Get the memory size associated with an object.</summary>
76 /// <value>Bytes of memory consumed by this object.</value>
77 public uint MemorySize {
78 get { return GetMemorySize(); }
80 private static IntPtr GetEflClassStatic()
82 return Efl.Cached.IItemConcrete.efl_cached_item_interface_get();
84 /// <summary>Wrapper for native methods and virtual method delegates.
85 /// For internal use by generated code only.</summary>
86 public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
88 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Efl);
89 /// <summary>Gets the list of Eo operations to override.</summary>
90 /// <returns>The list of Eo operations to be overload.</returns>
91 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
93 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
94 var methods = Efl.Eo.Globals.GetUserMethods(type);
96 if (efl_cached_item_memory_size_get_static_delegate == null)
98 efl_cached_item_memory_size_get_static_delegate = new efl_cached_item_memory_size_get_delegate(memory_size_get);
101 if (methods.FirstOrDefault(m => m.Name == "GetMemorySize") != null)
103 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_cached_item_memory_size_get"), func = Marshal.GetFunctionPointerForDelegate(efl_cached_item_memory_size_get_static_delegate) });
108 /// <summary>Returns the Eo class for the native methods of this class.</summary>
109 /// <returns>The native class pointer.</returns>
110 public override IntPtr GetEflClass()
112 return Efl.Cached.IItemConcrete.efl_cached_item_interface_get();
115 #pragma warning disable CA1707, CS1591, SA1300, SA1600
118 private delegate uint efl_cached_item_memory_size_get_delegate(System.IntPtr obj, System.IntPtr pd);
121 public delegate uint efl_cached_item_memory_size_get_api_delegate(System.IntPtr obj);
123 public static Efl.Eo.FunctionWrapper<efl_cached_item_memory_size_get_api_delegate> efl_cached_item_memory_size_get_ptr = new Efl.Eo.FunctionWrapper<efl_cached_item_memory_size_get_api_delegate>(Module, "efl_cached_item_memory_size_get");
125 private static uint memory_size_get(System.IntPtr obj, System.IntPtr pd)
127 Eina.Log.Debug("function efl_cached_item_memory_size_get was called");
128 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
131 uint _ret_var = default(uint);
134 _ret_var = ((IItem)ws.Target).GetMemorySize();
138 Eina.Log.Warning($"Callback error: {e.ToString()}");
139 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
147 return efl_cached_item_memory_size_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
151 private static efl_cached_item_memory_size_get_delegate efl_cached_item_memory_size_get_static_delegate;
153 #pragma warning restore CA1707, CS1591, SA1300, SA1600
162 #pragma warning disable CS1591
163 public static class Efl_CachedIItemConcrete_ExtensionMethods {
166 #pragma warning restore CS1591