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 rotate animation class</summary>
13 [Efl.Canvas.AnimationRotate.NativeMethods]
14 public class AnimationRotate : 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(AnimationRotate))
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_rotate_class_get();
34 /// <summary>Initializes a new instance of the <see cref="AnimationRotate"/> class.</summary>
35 /// <param name="parent">Parent instance.</param>
36 public AnimationRotate(Efl.Object parent= null
37 ) : base(efl_canvas_animation_rotate_class_get(), typeof(AnimationRotate), parent)
39 FinishInstantiation();
42 /// <summary>Initializes a new instance of the <see cref="AnimationRotate"/> 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 AnimationRotate(System.IntPtr raw) : base(raw)
49 /// <summary>Initializes a new instance of the <see cref="AnimationRotate"/> class.
50 /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
51 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
52 /// <param name="managedType">The managed type of the public constructor that originated this call.</param>
53 /// <param name="parent">The Efl.Object parent of this instance.</param>
54 protected AnimationRotate(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
58 /// <summary>Verifies if the given object is equal to this one.</summary>
59 /// <param name="instance">The object to compare to.</param>
60 /// <returns>True if both objects point to the same native object.</returns>
61 public override bool Equals(object instance)
63 var other = instance as Efl.Object;
68 return this.NativeHandle == other.NativeHandle;
71 /// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>
72 /// <returns>The value of the pointer, to be used as the hash code of this object.</returns>
73 public override int GetHashCode()
75 return this.NativeHandle.ToInt32();
78 /// <summary>Turns the native pointer into a string representation.</summary>
79 /// <returns>A string with the type and the native pointer for this object.</returns>
80 public override String ToString()
82 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
85 /// <summary>Rotate property</summary>
86 /// <param name="from_degree">Rotation degree when animation starts</param>
87 /// <param name="to_degree">Rotation degree when animation ends</param>
88 /// <param name="pivot">Pivot object for the center point. If the pivot object is NULL, then the object is rotated on itself.</param>
89 /// <param name="cx">X relative coordinate of the center point. The left end is 0.0 and the right end is 1.0 (the center is 0.5).</param>
90 /// <param name="cy">Y relative coordinate of the center point. The top end is 0.0 and the bottom end is 1.0 (the center is 0.5).</param>
91 virtual public void GetRotate(out double from_degree, out double to_degree, out Efl.Canvas.Object pivot, out double cx, out double cy) {
92 Efl.Canvas.AnimationRotate.NativeMethods.efl_animation_rotate_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),out from_degree, out to_degree, out pivot, out cx, out cy);
93 Eina.Error.RaiseIfUnhandledException();
95 /// <summary>Rotate property</summary>
96 /// <param name="from_degree">Rotation degree when animation starts</param>
97 /// <param name="to_degree">Rotation degree when animation ends</param>
98 /// <param name="pivot">Pivot object for the center point. If the pivot object is NULL, then the object is rotated on itself.</param>
99 /// <param name="cx">X relative coordinate of the center point. The left end is 0.0 and the right end is 1.0 (the center is 0.5).</param>
100 /// <param name="cy">Y relative coordinate of the center point. The top end is 0.0 and the bottom end is 1.0 (the center is 0.5).</param>
101 virtual public void SetRotate(double from_degree, double to_degree, Efl.Canvas.Object pivot, double cx, double cy) {
102 Efl.Canvas.AnimationRotate.NativeMethods.efl_animation_rotate_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),from_degree, to_degree, pivot, cx, cy);
103 Eina.Error.RaiseIfUnhandledException();
105 /// <summary>Rotate absolute property</summary>
106 /// <param name="from_degree">Rotation degree when animation starts</param>
107 /// <param name="to_degree">Rotation degree when animation ends</param>
108 /// <param name="cx">X absolute coordinate of the center point.</param>
109 /// <param name="cy">Y absolute coordinate of the center point.</param>
110 virtual public void GetRotateAbsolute(out double from_degree, out double to_degree, out int cx, out int cy) {
111 Efl.Canvas.AnimationRotate.NativeMethods.efl_animation_rotate_absolute_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),out from_degree, out to_degree, out cx, out cy);
112 Eina.Error.RaiseIfUnhandledException();
114 /// <summary>Rotate absolute property</summary>
115 /// <param name="from_degree">Rotation degree when animation starts</param>
116 /// <param name="to_degree">Rotation degree when animation ends</param>
117 /// <param name="cx">X absolute coordinate of the center point.</param>
118 /// <param name="cy">Y absolute coordinate of the center point.</param>
119 virtual public void SetRotateAbsolute(double from_degree, double to_degree, int cx, int cy) {
120 Efl.Canvas.AnimationRotate.NativeMethods.efl_animation_rotate_absolute_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),from_degree, to_degree, cx, cy);
121 Eina.Error.RaiseIfUnhandledException();
123 private static IntPtr GetEflClassStatic()
125 return Efl.Canvas.AnimationRotate.efl_canvas_animation_rotate_class_get();
127 /// <summary>Wrapper for native methods and virtual method delegates.
128 /// For internal use by generated code only.</summary>
129 public new class NativeMethods : Efl.Canvas.Animation.NativeMethods
131 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Evas);
132 /// <summary>Gets the list of Eo operations to override.</summary>
133 /// <returns>The list of Eo operations to be overload.</returns>
134 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
136 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
137 var methods = Efl.Eo.Globals.GetUserMethods(type);
139 if (efl_animation_rotate_get_static_delegate == null)
141 efl_animation_rotate_get_static_delegate = new efl_animation_rotate_get_delegate(rotate_get);
144 if (methods.FirstOrDefault(m => m.Name == "GetRotate") != null)
146 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_animation_rotate_get"), func = Marshal.GetFunctionPointerForDelegate(efl_animation_rotate_get_static_delegate) });
149 if (efl_animation_rotate_set_static_delegate == null)
151 efl_animation_rotate_set_static_delegate = new efl_animation_rotate_set_delegate(rotate_set);
154 if (methods.FirstOrDefault(m => m.Name == "SetRotate") != null)
156 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_animation_rotate_set"), func = Marshal.GetFunctionPointerForDelegate(efl_animation_rotate_set_static_delegate) });
159 if (efl_animation_rotate_absolute_get_static_delegate == null)
161 efl_animation_rotate_absolute_get_static_delegate = new efl_animation_rotate_absolute_get_delegate(rotate_absolute_get);
164 if (methods.FirstOrDefault(m => m.Name == "GetRotateAbsolute") != null)
166 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_animation_rotate_absolute_get"), func = Marshal.GetFunctionPointerForDelegate(efl_animation_rotate_absolute_get_static_delegate) });
169 if (efl_animation_rotate_absolute_set_static_delegate == null)
171 efl_animation_rotate_absolute_set_static_delegate = new efl_animation_rotate_absolute_set_delegate(rotate_absolute_set);
174 if (methods.FirstOrDefault(m => m.Name == "SetRotateAbsolute") != null)
176 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_animation_rotate_absolute_set"), func = Marshal.GetFunctionPointerForDelegate(efl_animation_rotate_absolute_set_static_delegate) });
179 descs.AddRange(base.GetEoOps(type));
182 /// <summary>Returns the Eo class for the native methods of this class.</summary>
183 /// <returns>The native class pointer.</returns>
184 public override IntPtr GetEflClass()
186 return Efl.Canvas.AnimationRotate.efl_canvas_animation_rotate_class_get();
189 #pragma warning disable CA1707, SA1300, SA1600
192 private delegate void efl_animation_rotate_get_delegate(System.IntPtr obj, System.IntPtr pd, out double from_degree, out double to_degree, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] out Efl.Canvas.Object pivot, out double cx, out double cy);
195 public delegate void efl_animation_rotate_get_api_delegate(System.IntPtr obj, out double from_degree, out double to_degree, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] out Efl.Canvas.Object pivot, out double cx, out double cy);
197 public static Efl.Eo.FunctionWrapper<efl_animation_rotate_get_api_delegate> efl_animation_rotate_get_ptr = new Efl.Eo.FunctionWrapper<efl_animation_rotate_get_api_delegate>(Module, "efl_animation_rotate_get");
199 private static void rotate_get(System.IntPtr obj, System.IntPtr pd, out double from_degree, out double to_degree, out Efl.Canvas.Object pivot, out double cx, out double cy)
201 Eina.Log.Debug("function efl_animation_rotate_get was called");
202 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
205 from_degree = default(double); to_degree = default(double); pivot = default(Efl.Canvas.Object); cx = default(double); cy = default(double);
208 ((AnimationRotate)wrapper).GetRotate(out from_degree, out to_degree, out pivot, out cx, out cy);
212 Eina.Log.Warning($"Callback error: {e.ToString()}");
213 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
220 efl_animation_rotate_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out from_degree, out to_degree, out pivot, out cx, out cy);
224 private static efl_animation_rotate_get_delegate efl_animation_rotate_get_static_delegate;
227 private delegate void efl_animation_rotate_set_delegate(System.IntPtr obj, System.IntPtr pd, double from_degree, double to_degree, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Canvas.Object pivot, double cx, double cy);
230 public delegate void efl_animation_rotate_set_api_delegate(System.IntPtr obj, double from_degree, double to_degree, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Canvas.Object pivot, double cx, double cy);
232 public static Efl.Eo.FunctionWrapper<efl_animation_rotate_set_api_delegate> efl_animation_rotate_set_ptr = new Efl.Eo.FunctionWrapper<efl_animation_rotate_set_api_delegate>(Module, "efl_animation_rotate_set");
234 private static void rotate_set(System.IntPtr obj, System.IntPtr pd, double from_degree, double to_degree, Efl.Canvas.Object pivot, double cx, double cy)
236 Eina.Log.Debug("function efl_animation_rotate_set was called");
237 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
243 ((AnimationRotate)wrapper).SetRotate(from_degree, to_degree, pivot, cx, cy);
247 Eina.Log.Warning($"Callback error: {e.ToString()}");
248 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
255 efl_animation_rotate_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), from_degree, to_degree, pivot, cx, cy);
259 private static efl_animation_rotate_set_delegate efl_animation_rotate_set_static_delegate;
262 private delegate void efl_animation_rotate_absolute_get_delegate(System.IntPtr obj, System.IntPtr pd, out double from_degree, out double to_degree, out int cx, out int cy);
265 public delegate void efl_animation_rotate_absolute_get_api_delegate(System.IntPtr obj, out double from_degree, out double to_degree, out int cx, out int cy);
267 public static Efl.Eo.FunctionWrapper<efl_animation_rotate_absolute_get_api_delegate> efl_animation_rotate_absolute_get_ptr = new Efl.Eo.FunctionWrapper<efl_animation_rotate_absolute_get_api_delegate>(Module, "efl_animation_rotate_absolute_get");
269 private static void rotate_absolute_get(System.IntPtr obj, System.IntPtr pd, out double from_degree, out double to_degree, out int cx, out int cy)
271 Eina.Log.Debug("function efl_animation_rotate_absolute_get was called");
272 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
275 from_degree = default(double); to_degree = default(double); cx = default(int); cy = default(int);
278 ((AnimationRotate)wrapper).GetRotateAbsolute(out from_degree, out to_degree, out cx, out cy);
282 Eina.Log.Warning($"Callback error: {e.ToString()}");
283 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
290 efl_animation_rotate_absolute_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out from_degree, out to_degree, out cx, out cy);
294 private static efl_animation_rotate_absolute_get_delegate efl_animation_rotate_absolute_get_static_delegate;
297 private delegate void efl_animation_rotate_absolute_set_delegate(System.IntPtr obj, System.IntPtr pd, double from_degree, double to_degree, int cx, int cy);
300 public delegate void efl_animation_rotate_absolute_set_api_delegate(System.IntPtr obj, double from_degree, double to_degree, int cx, int cy);
302 public static Efl.Eo.FunctionWrapper<efl_animation_rotate_absolute_set_api_delegate> efl_animation_rotate_absolute_set_ptr = new Efl.Eo.FunctionWrapper<efl_animation_rotate_absolute_set_api_delegate>(Module, "efl_animation_rotate_absolute_set");
304 private static void rotate_absolute_set(System.IntPtr obj, System.IntPtr pd, double from_degree, double to_degree, int cx, int cy)
306 Eina.Log.Debug("function efl_animation_rotate_absolute_set was called");
307 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
313 ((AnimationRotate)wrapper).SetRotateAbsolute(from_degree, to_degree, cx, cy);
317 Eina.Log.Warning($"Callback error: {e.ToString()}");
318 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
325 efl_animation_rotate_absolute_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), from_degree, to_degree, cx, cy);
329 private static efl_animation_rotate_absolute_set_delegate efl_animation_rotate_absolute_set_static_delegate;
331 #pragma warning restore CA1707, SA1300, SA1600