1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.Threading;
7 using System.ComponentModel;
12 /// <summary>Efl group animation abstract class</summary>
13 [Efl.Canvas.AnimationGroup.NativeMethods]
14 public abstract class AnimationGroup : Efl.Canvas.Animation, Efl.Eo.IWrapper
16 ///<summary>Pointer to the native class description.</summary>
17 public override System.IntPtr NativeClass
21 if (((object)this).GetType() == typeof(AnimationGroup))
23 return GetEflClassStatic();
27 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
32 [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
33 efl_canvas_animation_group_class_get();
34 /// <summary>Initializes a new instance of the <see cref="AnimationGroup"/> class.</summary>
35 /// <param name="parent">Parent instance.</param>
36 public AnimationGroup(Efl.Object parent= null
37 ) : base(efl_canvas_animation_group_class_get(), typeof(AnimationGroup), parent)
39 FinishInstantiation();
42 /// <summary>Initializes a new instance of the <see cref="AnimationGroup"/> class.
43 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
44 /// <param name="raw">The native pointer to be wrapped.</param>
45 protected AnimationGroup(System.IntPtr raw) : base(raw)
49 [Efl.Eo.PrivateNativeClass]
50 private class AnimationGroupRealized : AnimationGroup
52 private AnimationGroupRealized(IntPtr ptr) : base(ptr)
56 /// <summary>Initializes a new instance of the <see cref="AnimationGroup"/> class.
57 /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
58 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
59 /// <param name="managedType">The managed type of the public constructor that originated this call.</param>
60 /// <param name="parent">The Efl.Object parent of this instance.</param>
61 protected AnimationGroup(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
65 /// <summary>Verifies if the given object is equal to this one.</summary>
66 /// <param name="instance">The object to compare to.</param>
67 /// <returns>True if both objects point to the same native object.</returns>
68 public override bool Equals(object instance)
70 var other = instance as Efl.Object;
75 return this.NativeHandle == other.NativeHandle;
78 /// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>
79 /// <returns>The value of the pointer, to be used as the hash code of this object.</returns>
80 public override int GetHashCode()
82 return this.NativeHandle.ToInt32();
85 /// <summary>Turns the native pointer into a string representation.</summary>
86 /// <returns>A string with the type and the native pointer for this object.</returns>
87 public override String ToString()
89 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
92 /// <summary>Add the given animation to the animation group.</summary>
93 /// <param name="animation">The animation which needs to be added to the animation group</param>
94 virtual public void AddAnimation(Efl.Canvas.Animation animation) {
95 Efl.Canvas.AnimationGroup.NativeMethods.efl_animation_group_animation_add_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),animation);
96 Eina.Error.RaiseIfUnhandledException();
98 /// <summary>Delete the given animation from the animation group.</summary>
99 /// <param name="animation">The animation which needs to be deleted from the animation group</param>
100 virtual public void DelAnimation(Efl.Canvas.Animation animation) {
101 Efl.Canvas.AnimationGroup.NativeMethods.efl_animation_group_animation_del_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),animation);
102 Eina.Error.RaiseIfUnhandledException();
104 /// <summary>Get the animations of the animation group.</summary>
105 /// <returns>The animations of the animation group</returns>
106 virtual public Eina.List<Efl.Canvas.Animation> GetAnimations() {
107 var _ret_var = Efl.Canvas.AnimationGroup.NativeMethods.efl_animation_group_animations_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
108 Eina.Error.RaiseIfUnhandledException();
109 return new Eina.List<Efl.Canvas.Animation>(_ret_var, false, false);
111 private static IntPtr GetEflClassStatic()
113 return Efl.Canvas.AnimationGroup.efl_canvas_animation_group_class_get();
115 /// <summary>Wrapper for native methods and virtual method delegates.
116 /// For internal use by generated code only.</summary>
117 public new class NativeMethods : Efl.Canvas.Animation.NativeMethods
119 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Evas);
120 /// <summary>Gets the list of Eo operations to override.</summary>
121 /// <returns>The list of Eo operations to be overload.</returns>
122 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
124 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
125 var methods = Efl.Eo.Globals.GetUserMethods(type);
127 if (efl_animation_group_animation_add_static_delegate == null)
129 efl_animation_group_animation_add_static_delegate = new efl_animation_group_animation_add_delegate(animation_add);
132 if (methods.FirstOrDefault(m => m.Name == "AddAnimation") != null)
134 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_animation_group_animation_add"), func = Marshal.GetFunctionPointerForDelegate(efl_animation_group_animation_add_static_delegate) });
137 if (efl_animation_group_animation_del_static_delegate == null)
139 efl_animation_group_animation_del_static_delegate = new efl_animation_group_animation_del_delegate(animation_del);
142 if (methods.FirstOrDefault(m => m.Name == "DelAnimation") != null)
144 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_animation_group_animation_del"), func = Marshal.GetFunctionPointerForDelegate(efl_animation_group_animation_del_static_delegate) });
147 if (efl_animation_group_animations_get_static_delegate == null)
149 efl_animation_group_animations_get_static_delegate = new efl_animation_group_animations_get_delegate(animations_get);
152 if (methods.FirstOrDefault(m => m.Name == "GetAnimations") != null)
154 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_animation_group_animations_get"), func = Marshal.GetFunctionPointerForDelegate(efl_animation_group_animations_get_static_delegate) });
157 descs.AddRange(base.GetEoOps(type));
160 /// <summary>Returns the Eo class for the native methods of this class.</summary>
161 /// <returns>The native class pointer.</returns>
162 public override IntPtr GetEflClass()
164 return Efl.Canvas.AnimationGroup.efl_canvas_animation_group_class_get();
167 #pragma warning disable CA1707, SA1300, SA1600
170 private delegate void efl_animation_group_animation_add_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Canvas.Animation animation);
173 public delegate void efl_animation_group_animation_add_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Canvas.Animation animation);
175 public static Efl.Eo.FunctionWrapper<efl_animation_group_animation_add_api_delegate> efl_animation_group_animation_add_ptr = new Efl.Eo.FunctionWrapper<efl_animation_group_animation_add_api_delegate>(Module, "efl_animation_group_animation_add");
177 private static void animation_add(System.IntPtr obj, System.IntPtr pd, Efl.Canvas.Animation animation)
179 Eina.Log.Debug("function efl_animation_group_animation_add was called");
180 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
186 ((AnimationGroup)wrapper).AddAnimation(animation);
190 Eina.Log.Warning($"Callback error: {e.ToString()}");
191 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
198 efl_animation_group_animation_add_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), animation);
202 private static efl_animation_group_animation_add_delegate efl_animation_group_animation_add_static_delegate;
205 private delegate void efl_animation_group_animation_del_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Canvas.Animation animation);
208 public delegate void efl_animation_group_animation_del_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Canvas.Animation animation);
210 public static Efl.Eo.FunctionWrapper<efl_animation_group_animation_del_api_delegate> efl_animation_group_animation_del_ptr = new Efl.Eo.FunctionWrapper<efl_animation_group_animation_del_api_delegate>(Module, "efl_animation_group_animation_del");
212 private static void animation_del(System.IntPtr obj, System.IntPtr pd, Efl.Canvas.Animation animation)
214 Eina.Log.Debug("function efl_animation_group_animation_del was called");
215 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
221 ((AnimationGroup)wrapper).DelAnimation(animation);
225 Eina.Log.Warning($"Callback error: {e.ToString()}");
226 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
233 efl_animation_group_animation_del_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), animation);
237 private static efl_animation_group_animation_del_delegate efl_animation_group_animation_del_static_delegate;
240 private delegate System.IntPtr efl_animation_group_animations_get_delegate(System.IntPtr obj, System.IntPtr pd);
243 public delegate System.IntPtr efl_animation_group_animations_get_api_delegate(System.IntPtr obj);
245 public static Efl.Eo.FunctionWrapper<efl_animation_group_animations_get_api_delegate> efl_animation_group_animations_get_ptr = new Efl.Eo.FunctionWrapper<efl_animation_group_animations_get_api_delegate>(Module, "efl_animation_group_animations_get");
247 private static System.IntPtr animations_get(System.IntPtr obj, System.IntPtr pd)
249 Eina.Log.Debug("function efl_animation_group_animations_get was called");
250 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
253 Eina.List<Efl.Canvas.Animation> _ret_var = default(Eina.List<Efl.Canvas.Animation>);
256 _ret_var = ((AnimationGroup)wrapper).GetAnimations();
260 Eina.Log.Warning($"Callback error: {e.ToString()}");
261 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
264 return _ret_var.Handle;
269 return efl_animation_group_animations_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
273 private static efl_animation_group_animations_get_delegate efl_animation_group_animations_get_static_delegate;
275 #pragma warning restore CA1707, SA1300, SA1600