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 scale animation class</summary>
13 [Efl.Canvas.AnimationScale.NativeMethods]
14 public class AnimationScale : 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(AnimationScale))
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_scale_class_get();
34 /// <summary>Initializes a new instance of the <see cref="AnimationScale"/> class.</summary>
35 /// <param name="parent">Parent instance.</param>
36 public AnimationScale(Efl.Object parent= null
37 ) : base(efl_canvas_animation_scale_class_get(), typeof(AnimationScale), parent)
39 FinishInstantiation();
42 /// <summary>Initializes a new instance of the <see cref="AnimationScale"/> 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 AnimationScale(System.IntPtr raw) : base(raw)
49 /// <summary>Initializes a new instance of the <see cref="AnimationScale"/> 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 AnimationScale(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>Scale property</summary>
86 /// <param name="from_scale_x">Scale factor along x axis when animation starts</param>
87 /// <param name="from_scale_y">Scale factor along y axis when animation starts</param>
88 /// <param name="to_scale_x">Scale factor along x axis when animation ends</param>
89 /// <param name="to_scale_y">Scale factor along y axis when animation ends</param>
90 /// <param name="pivot">Pivot object for the center point. If the pivot object is NULL, then the object is scaled on itself.</param>
91 /// <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>
92 /// <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>
93 virtual public void GetScale(out double from_scale_x, out double from_scale_y, out double to_scale_x, out double to_scale_y, out Efl.Canvas.Object pivot, out double cx, out double cy) {
94 Efl.Canvas.AnimationScale.NativeMethods.efl_animation_scale_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),out from_scale_x, out from_scale_y, out to_scale_x, out to_scale_y, out pivot, out cx, out cy);
95 Eina.Error.RaiseIfUnhandledException();
97 /// <summary>Scale property</summary>
98 /// <param name="from_scale_x">Scale factor along x axis when animation starts</param>
99 /// <param name="from_scale_y">Scale factor along y axis when animation starts</param>
100 /// <param name="to_scale_x">Scale factor along x axis when animation ends</param>
101 /// <param name="to_scale_y">Scale factor along y axis when animation ends</param>
102 /// <param name="pivot">Pivot object for the center point. If the pivot object is NULL, then the object is scaled on itself.</param>
103 /// <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>
104 /// <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>
105 virtual public void SetScale(double from_scale_x, double from_scale_y, double to_scale_x, double to_scale_y, Efl.Canvas.Object pivot, double cx, double cy) {
106 Efl.Canvas.AnimationScale.NativeMethods.efl_animation_scale_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),from_scale_x, from_scale_y, to_scale_x, to_scale_y, pivot, cx, cy);
107 Eina.Error.RaiseIfUnhandledException();
109 /// <summary>Scale absolute property</summary>
110 /// <param name="from_scale_x">Scale factor along x axis when animation starts</param>
111 /// <param name="from_scale_y">Scale factor along y axis when animation starts</param>
112 /// <param name="to_scale_x">Scale factor along x axis when animation ends</param>
113 /// <param name="to_scale_y">Scale factor along y axis when animation ends</param>
114 /// <param name="cx">X absolute coordinate of the center point.</param>
115 /// <param name="cy">Y absolute coordinate of the center point.</param>
116 virtual public void GetScaleAbsolute(out double from_scale_x, out double from_scale_y, out double to_scale_x, out double to_scale_y, out int cx, out int cy) {
117 Efl.Canvas.AnimationScale.NativeMethods.efl_animation_scale_absolute_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),out from_scale_x, out from_scale_y, out to_scale_x, out to_scale_y, out cx, out cy);
118 Eina.Error.RaiseIfUnhandledException();
120 /// <summary>Scale absolute property</summary>
121 /// <param name="from_scale_x">Scale factor along x axis when animation starts</param>
122 /// <param name="from_scale_y">Scale factor along y axis when animation starts</param>
123 /// <param name="to_scale_x">Scale factor along x axis when animation ends</param>
124 /// <param name="to_scale_y">Scale factor along y axis when animation ends</param>
125 /// <param name="cx">X absolute coordinate of the center point.</param>
126 /// <param name="cy">Y absolute coordinate of the center point.</param>
127 virtual public void SetScaleAbsolute(double from_scale_x, double from_scale_y, double to_scale_x, double to_scale_y, int cx, int cy) {
128 Efl.Canvas.AnimationScale.NativeMethods.efl_animation_scale_absolute_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),from_scale_x, from_scale_y, to_scale_x, to_scale_y, cx, cy);
129 Eina.Error.RaiseIfUnhandledException();
131 private static IntPtr GetEflClassStatic()
133 return Efl.Canvas.AnimationScale.efl_canvas_animation_scale_class_get();
135 /// <summary>Wrapper for native methods and virtual method delegates.
136 /// For internal use by generated code only.</summary>
137 public new class NativeMethods : Efl.Canvas.Animation.NativeMethods
139 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Evas);
140 /// <summary>Gets the list of Eo operations to override.</summary>
141 /// <returns>The list of Eo operations to be overload.</returns>
142 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
144 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
145 var methods = Efl.Eo.Globals.GetUserMethods(type);
147 if (efl_animation_scale_get_static_delegate == null)
149 efl_animation_scale_get_static_delegate = new efl_animation_scale_get_delegate(scale_get);
152 if (methods.FirstOrDefault(m => m.Name == "GetScale") != null)
154 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_animation_scale_get"), func = Marshal.GetFunctionPointerForDelegate(efl_animation_scale_get_static_delegate) });
157 if (efl_animation_scale_set_static_delegate == null)
159 efl_animation_scale_set_static_delegate = new efl_animation_scale_set_delegate(scale_set);
162 if (methods.FirstOrDefault(m => m.Name == "SetScale") != null)
164 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_animation_scale_set"), func = Marshal.GetFunctionPointerForDelegate(efl_animation_scale_set_static_delegate) });
167 if (efl_animation_scale_absolute_get_static_delegate == null)
169 efl_animation_scale_absolute_get_static_delegate = new efl_animation_scale_absolute_get_delegate(scale_absolute_get);
172 if (methods.FirstOrDefault(m => m.Name == "GetScaleAbsolute") != null)
174 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_animation_scale_absolute_get"), func = Marshal.GetFunctionPointerForDelegate(efl_animation_scale_absolute_get_static_delegate) });
177 if (efl_animation_scale_absolute_set_static_delegate == null)
179 efl_animation_scale_absolute_set_static_delegate = new efl_animation_scale_absolute_set_delegate(scale_absolute_set);
182 if (methods.FirstOrDefault(m => m.Name == "SetScaleAbsolute") != null)
184 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_animation_scale_absolute_set"), func = Marshal.GetFunctionPointerForDelegate(efl_animation_scale_absolute_set_static_delegate) });
187 descs.AddRange(base.GetEoOps(type));
190 /// <summary>Returns the Eo class for the native methods of this class.</summary>
191 /// <returns>The native class pointer.</returns>
192 public override IntPtr GetEflClass()
194 return Efl.Canvas.AnimationScale.efl_canvas_animation_scale_class_get();
197 #pragma warning disable CA1707, SA1300, SA1600
200 private delegate void efl_animation_scale_get_delegate(System.IntPtr obj, System.IntPtr pd, out double from_scale_x, out double from_scale_y, out double to_scale_x, out double to_scale_y, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] out Efl.Canvas.Object pivot, out double cx, out double cy);
203 public delegate void efl_animation_scale_get_api_delegate(System.IntPtr obj, out double from_scale_x, out double from_scale_y, out double to_scale_x, out double to_scale_y, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] out Efl.Canvas.Object pivot, out double cx, out double cy);
205 public static Efl.Eo.FunctionWrapper<efl_animation_scale_get_api_delegate> efl_animation_scale_get_ptr = new Efl.Eo.FunctionWrapper<efl_animation_scale_get_api_delegate>(Module, "efl_animation_scale_get");
207 private static void scale_get(System.IntPtr obj, System.IntPtr pd, out double from_scale_x, out double from_scale_y, out double to_scale_x, out double to_scale_y, out Efl.Canvas.Object pivot, out double cx, out double cy)
209 Eina.Log.Debug("function efl_animation_scale_get was called");
210 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
213 from_scale_x = default(double); from_scale_y = default(double); to_scale_x = default(double); to_scale_y = default(double); pivot = default(Efl.Canvas.Object); cx = default(double); cy = default(double);
216 ((AnimationScale)wrapper).GetScale(out from_scale_x, out from_scale_y, out to_scale_x, out to_scale_y, out pivot, out cx, out cy);
220 Eina.Log.Warning($"Callback error: {e.ToString()}");
221 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
228 efl_animation_scale_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out from_scale_x, out from_scale_y, out to_scale_x, out to_scale_y, out pivot, out cx, out cy);
232 private static efl_animation_scale_get_delegate efl_animation_scale_get_static_delegate;
235 private delegate void efl_animation_scale_set_delegate(System.IntPtr obj, System.IntPtr pd, double from_scale_x, double from_scale_y, double to_scale_x, double to_scale_y, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Canvas.Object pivot, double cx, double cy);
238 public delegate void efl_animation_scale_set_api_delegate(System.IntPtr obj, double from_scale_x, double from_scale_y, double to_scale_x, double to_scale_y, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))] Efl.Canvas.Object pivot, double cx, double cy);
240 public static Efl.Eo.FunctionWrapper<efl_animation_scale_set_api_delegate> efl_animation_scale_set_ptr = new Efl.Eo.FunctionWrapper<efl_animation_scale_set_api_delegate>(Module, "efl_animation_scale_set");
242 private static void scale_set(System.IntPtr obj, System.IntPtr pd, double from_scale_x, double from_scale_y, double to_scale_x, double to_scale_y, Efl.Canvas.Object pivot, double cx, double cy)
244 Eina.Log.Debug("function efl_animation_scale_set was called");
245 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
251 ((AnimationScale)wrapper).SetScale(from_scale_x, from_scale_y, to_scale_x, to_scale_y, pivot, cx, cy);
255 Eina.Log.Warning($"Callback error: {e.ToString()}");
256 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
263 efl_animation_scale_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), from_scale_x, from_scale_y, to_scale_x, to_scale_y, pivot, cx, cy);
267 private static efl_animation_scale_set_delegate efl_animation_scale_set_static_delegate;
270 private delegate void efl_animation_scale_absolute_get_delegate(System.IntPtr obj, System.IntPtr pd, out double from_scale_x, out double from_scale_y, out double to_scale_x, out double to_scale_y, out int cx, out int cy);
273 public delegate void efl_animation_scale_absolute_get_api_delegate(System.IntPtr obj, out double from_scale_x, out double from_scale_y, out double to_scale_x, out double to_scale_y, out int cx, out int cy);
275 public static Efl.Eo.FunctionWrapper<efl_animation_scale_absolute_get_api_delegate> efl_animation_scale_absolute_get_ptr = new Efl.Eo.FunctionWrapper<efl_animation_scale_absolute_get_api_delegate>(Module, "efl_animation_scale_absolute_get");
277 private static void scale_absolute_get(System.IntPtr obj, System.IntPtr pd, out double from_scale_x, out double from_scale_y, out double to_scale_x, out double to_scale_y, out int cx, out int cy)
279 Eina.Log.Debug("function efl_animation_scale_absolute_get was called");
280 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
283 from_scale_x = default(double); from_scale_y = default(double); to_scale_x = default(double); to_scale_y = default(double); cx = default(int); cy = default(int);
286 ((AnimationScale)wrapper).GetScaleAbsolute(out from_scale_x, out from_scale_y, out to_scale_x, out to_scale_y, out cx, out cy);
290 Eina.Log.Warning($"Callback error: {e.ToString()}");
291 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
298 efl_animation_scale_absolute_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out from_scale_x, out from_scale_y, out to_scale_x, out to_scale_y, out cx, out cy);
302 private static efl_animation_scale_absolute_get_delegate efl_animation_scale_absolute_get_static_delegate;
305 private delegate void efl_animation_scale_absolute_set_delegate(System.IntPtr obj, System.IntPtr pd, double from_scale_x, double from_scale_y, double to_scale_x, double to_scale_y, int cx, int cy);
308 public delegate void efl_animation_scale_absolute_set_api_delegate(System.IntPtr obj, double from_scale_x, double from_scale_y, double to_scale_x, double to_scale_y, int cx, int cy);
310 public static Efl.Eo.FunctionWrapper<efl_animation_scale_absolute_set_api_delegate> efl_animation_scale_absolute_set_ptr = new Efl.Eo.FunctionWrapper<efl_animation_scale_absolute_set_api_delegate>(Module, "efl_animation_scale_absolute_set");
312 private static void scale_absolute_set(System.IntPtr obj, System.IntPtr pd, double from_scale_x, double from_scale_y, double to_scale_x, double to_scale_y, int cx, int cy)
314 Eina.Log.Debug("function efl_animation_scale_absolute_set was called");
315 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
321 ((AnimationScale)wrapper).SetScaleAbsolute(from_scale_x, from_scale_y, to_scale_x, to_scale_y, cx, cy);
325 Eina.Log.Warning($"Callback error: {e.ToString()}");
326 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
333 efl_animation_scale_absolute_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), from_scale_x, from_scale_y, to_scale_x, to_scale_y, cx, cy);
337 private static efl_animation_scale_absolute_set_delegate efl_animation_scale_absolute_set_static_delegate;
339 #pragma warning restore CA1707, SA1300, SA1600