1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.ComponentModel;
7 namespace Efl { namespace Canvas {
8 /// <summary>Efl group animation abstract class</summary>
9 [AnimationGroupNativeInherit]
10 public abstract class AnimationGroup : Efl.Canvas.Animation, Efl.Eo.IWrapper
12 ///<summary>Pointer to the native class description.</summary>
13 public override System.IntPtr NativeClass {
15 if (((object)this).GetType() == typeof (AnimationGroup))
16 return Efl.Canvas.AnimationGroupNativeInherit.GetEflClassStatic();
18 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
21 [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
22 efl_canvas_animation_group_class_get();
23 ///<summary>Creates a new instance.</summary>
24 ///<param name="parent">Parent instance.</param>
25 public AnimationGroup(Efl.Object parent= null
27 base(efl_canvas_animation_group_class_get(), typeof(AnimationGroup), parent)
29 FinishInstantiation();
31 ///<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>
32 protected AnimationGroup(System.IntPtr raw) : base(raw)
34 RegisterEventProxies();
36 [Efl.Eo.PrivateNativeClass]
37 private class AnimationGroupRealized : AnimationGroup
39 private AnimationGroupRealized(IntPtr ptr) : base(ptr)
43 ///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
44 protected AnimationGroup(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}
45 ///<summary>Verifies if the given object is equal to this one.</summary>
46 public override bool Equals(object obj)
48 var other = obj as Efl.Object;
51 return this.NativeHandle == other.NativeHandle;
53 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
54 public override int GetHashCode()
56 return this.NativeHandle.ToInt32();
58 ///<summary>Turns the native pointer into a string representation.</summary>
59 public override String ToString()
61 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
63 ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
64 protected override void RegisterEventProxies()
66 base.RegisterEventProxies();
68 /// <summary>Add the given animation to the animation group.</summary>
69 /// <param name="animation">The animation which needs to be added to the animation group</param>
70 /// <returns></returns>
71 virtual public void AddAnimation( Efl.Canvas.Animation animation) {
72 Efl.Canvas.AnimationGroupNativeInherit.efl_animation_group_animation_add_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), animation);
73 Eina.Error.RaiseIfUnhandledException();
75 /// <summary>Delete the given animation from the animation group.</summary>
76 /// <param name="animation">The animation which needs to be deleted from the animation group</param>
77 /// <returns></returns>
78 virtual public void DelAnimation( Efl.Canvas.Animation animation) {
79 Efl.Canvas.AnimationGroupNativeInherit.efl_animation_group_animation_del_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), animation);
80 Eina.Error.RaiseIfUnhandledException();
82 /// <summary>Get the animations of the animation group.</summary>
83 /// <returns>The animations of the animation group</returns>
84 virtual public Eina.List<Efl.Canvas.Animation> GetAnimations() {
85 var _ret_var = Efl.Canvas.AnimationGroupNativeInherit.efl_animation_group_animations_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
86 Eina.Error.RaiseIfUnhandledException();
87 return new Eina.List<Efl.Canvas.Animation>(_ret_var, false, false);
89 private static IntPtr GetEflClassStatic()
91 return Efl.Canvas.AnimationGroup.efl_canvas_animation_group_class_get();
94 public class AnimationGroupNativeInherit : Efl.Canvas.AnimationNativeInherit{
95 public new static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Evas);
96 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
98 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
99 var methods = Efl.Eo.Globals.GetUserMethods(type);
100 if (efl_animation_group_animation_add_static_delegate == null)
101 efl_animation_group_animation_add_static_delegate = new efl_animation_group_animation_add_delegate(animation_add);
102 if (methods.FirstOrDefault(m => m.Name == "AddAnimation") != null)
103 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)});
104 if (efl_animation_group_animation_del_static_delegate == null)
105 efl_animation_group_animation_del_static_delegate = new efl_animation_group_animation_del_delegate(animation_del);
106 if (methods.FirstOrDefault(m => m.Name == "DelAnimation") != null)
107 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)});
108 if (efl_animation_group_animations_get_static_delegate == null)
109 efl_animation_group_animations_get_static_delegate = new efl_animation_group_animations_get_delegate(animations_get);
110 if (methods.FirstOrDefault(m => m.Name == "GetAnimations") != null)
111 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)});
112 descs.AddRange(base.GetEoOps(type));
115 public override IntPtr GetEflClass()
117 return Efl.Canvas.AnimationGroup.efl_canvas_animation_group_class_get();
119 public static new IntPtr GetEflClassStatic()
121 return Efl.Canvas.AnimationGroup.efl_canvas_animation_group_class_get();
125 private delegate void efl_animation_group_animation_add_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Canvas.Animation, Efl.Eo.NonOwnTag>))] Efl.Canvas.Animation animation);
128 public delegate void efl_animation_group_animation_add_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Canvas.Animation, Efl.Eo.NonOwnTag>))] Efl.Canvas.Animation animation);
129 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");
130 private static void animation_add(System.IntPtr obj, System.IntPtr pd, Efl.Canvas.Animation animation)
132 Eina.Log.Debug("function efl_animation_group_animation_add was called");
133 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
134 if(wrapper != null) {
137 ((AnimationGroup)wrapper).AddAnimation( animation);
138 } catch (Exception e) {
139 Eina.Log.Warning($"Callback error: {e.ToString()}");
140 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
143 efl_animation_group_animation_add_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), animation);
146 private static efl_animation_group_animation_add_delegate efl_animation_group_animation_add_static_delegate;
149 private delegate void efl_animation_group_animation_del_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Canvas.Animation, Efl.Eo.NonOwnTag>))] Efl.Canvas.Animation animation);
152 public delegate void efl_animation_group_animation_del_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalTest<Efl.Canvas.Animation, Efl.Eo.NonOwnTag>))] Efl.Canvas.Animation animation);
153 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");
154 private static void animation_del(System.IntPtr obj, System.IntPtr pd, Efl.Canvas.Animation animation)
156 Eina.Log.Debug("function efl_animation_group_animation_del was called");
157 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
158 if(wrapper != null) {
161 ((AnimationGroup)wrapper).DelAnimation( animation);
162 } catch (Exception e) {
163 Eina.Log.Warning($"Callback error: {e.ToString()}");
164 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
167 efl_animation_group_animation_del_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), animation);
170 private static efl_animation_group_animation_del_delegate efl_animation_group_animation_del_static_delegate;
173 private delegate System.IntPtr efl_animation_group_animations_get_delegate(System.IntPtr obj, System.IntPtr pd);
176 public delegate System.IntPtr efl_animation_group_animations_get_api_delegate(System.IntPtr obj);
177 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");
178 private static System.IntPtr animations_get(System.IntPtr obj, System.IntPtr pd)
180 Eina.Log.Debug("function efl_animation_group_animations_get was called");
181 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
182 if(wrapper != null) {
183 Eina.List<Efl.Canvas.Animation> _ret_var = default(Eina.List<Efl.Canvas.Animation>);
185 _ret_var = ((AnimationGroup)wrapper).GetAnimations();
186 } catch (Exception e) {
187 Eina.Log.Warning($"Callback error: {e.ToString()}");
188 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
190 return _ret_var.Handle;
192 return efl_animation_group_animations_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
195 private static efl_animation_group_animations_get_delegate efl_animation_group_animations_get_static_delegate;