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 scale animation class</summary>
9 [AnimationScaleNativeInherit]
10 public class AnimationScale : 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 (AnimationScale))
16 return Efl.Canvas.AnimationScaleNativeInherit.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_scale_class_get();
23 ///<summary>Creates a new instance.</summary>
24 ///<param name="parent">Parent instance.</param>
25 public AnimationScale(Efl.Object parent= null
27 base(efl_canvas_animation_scale_class_get(), typeof(AnimationScale), 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 AnimationScale(System.IntPtr raw) : base(raw)
34 RegisterEventProxies();
36 ///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
37 protected AnimationScale(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}
38 ///<summary>Verifies if the given object is equal to this one.</summary>
39 public override bool Equals(object obj)
41 var other = obj as Efl.Object;
44 return this.NativeHandle == other.NativeHandle;
46 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
47 public override int GetHashCode()
49 return this.NativeHandle.ToInt32();
51 ///<summary>Turns the native pointer into a string representation.</summary>
52 public override String ToString()
54 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
56 ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
57 protected override void RegisterEventProxies()
59 base.RegisterEventProxies();
61 /// <summary>Scale property</summary>
62 /// <param name="from_scale_x">Scale factor along x axis when animation starts</param>
63 /// <param name="from_scale_y">Scale factor along y axis when animation starts</param>
64 /// <param name="to_scale_x">Scale factor along x axis when animation ends</param>
65 /// <param name="to_scale_y">Scale factor along y axis when animation ends</param>
66 /// <param name="pivot">Pivot object for the center point. If the pivot object is NULL, then the object is scaled on itself.</param>
67 /// <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>
68 /// <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>
69 /// <returns></returns>
70 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) {
71 Efl.Canvas.AnimationScaleNativeInherit.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);
72 Eina.Error.RaiseIfUnhandledException();
74 /// <summary>Scale property</summary>
75 /// <param name="from_scale_x">Scale factor along x axis when animation starts</param>
76 /// <param name="from_scale_y">Scale factor along y axis when animation starts</param>
77 /// <param name="to_scale_x">Scale factor along x axis when animation ends</param>
78 /// <param name="to_scale_y">Scale factor along y axis when animation ends</param>
79 /// <param name="pivot">Pivot object for the center point. If the pivot object is NULL, then the object is scaled on itself.</param>
80 /// <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>
81 /// <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>
82 /// <returns></returns>
83 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) {
84 Efl.Canvas.AnimationScaleNativeInherit.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);
85 Eina.Error.RaiseIfUnhandledException();
87 /// <summary>Scale absolute property</summary>
88 /// <param name="from_scale_x">Scale factor along x axis when animation starts</param>
89 /// <param name="from_scale_y">Scale factor along y axis when animation starts</param>
90 /// <param name="to_scale_x">Scale factor along x axis when animation ends</param>
91 /// <param name="to_scale_y">Scale factor along y axis when animation ends</param>
92 /// <param name="cx">X absolute coordinate of the center point.</param>
93 /// <param name="cy">Y absolute coordinate of the center point.</param>
94 /// <returns></returns>
95 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) {
96 Efl.Canvas.AnimationScaleNativeInherit.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);
97 Eina.Error.RaiseIfUnhandledException();
99 /// <summary>Scale absolute property</summary>
100 /// <param name="from_scale_x">Scale factor along x axis when animation starts</param>
101 /// <param name="from_scale_y">Scale factor along y axis when animation starts</param>
102 /// <param name="to_scale_x">Scale factor along x axis when animation ends</param>
103 /// <param name="to_scale_y">Scale factor along y axis when animation ends</param>
104 /// <param name="cx">X absolute coordinate of the center point.</param>
105 /// <param name="cy">Y absolute coordinate of the center point.</param>
106 /// <returns></returns>
107 virtual public void SetScaleAbsolute( double from_scale_x, double from_scale_y, double to_scale_x, double to_scale_y, int cx, int cy) {
108 Efl.Canvas.AnimationScaleNativeInherit.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);
109 Eina.Error.RaiseIfUnhandledException();
111 private static IntPtr GetEflClassStatic()
113 return Efl.Canvas.AnimationScale.efl_canvas_animation_scale_class_get();
116 public class AnimationScaleNativeInherit : Efl.Canvas.AnimationNativeInherit{
117 public new static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Evas);
118 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
120 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
121 var methods = Efl.Eo.Globals.GetUserMethods(type);
122 if (efl_animation_scale_get_static_delegate == null)
123 efl_animation_scale_get_static_delegate = new efl_animation_scale_get_delegate(scale_get);
124 if (methods.FirstOrDefault(m => m.Name == "GetScale") != null)
125 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)});
126 if (efl_animation_scale_set_static_delegate == null)
127 efl_animation_scale_set_static_delegate = new efl_animation_scale_set_delegate(scale_set);
128 if (methods.FirstOrDefault(m => m.Name == "SetScale") != null)
129 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)});
130 if (efl_animation_scale_absolute_get_static_delegate == null)
131 efl_animation_scale_absolute_get_static_delegate = new efl_animation_scale_absolute_get_delegate(scale_absolute_get);
132 if (methods.FirstOrDefault(m => m.Name == "GetScaleAbsolute") != null)
133 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)});
134 if (efl_animation_scale_absolute_set_static_delegate == null)
135 efl_animation_scale_absolute_set_static_delegate = new efl_animation_scale_absolute_set_delegate(scale_absolute_set);
136 if (methods.FirstOrDefault(m => m.Name == "SetScaleAbsolute") != null)
137 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)});
138 descs.AddRange(base.GetEoOps(type));
141 public override IntPtr GetEflClass()
143 return Efl.Canvas.AnimationScale.efl_canvas_animation_scale_class_get();
145 public static new IntPtr GetEflClassStatic()
147 return Efl.Canvas.AnimationScale.efl_canvas_animation_scale_class_get();
151 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.MarshalTest<Efl.Canvas.Object, Efl.Eo.NonOwnTag>))] out Efl.Canvas.Object pivot, out double cx, out double cy);
154 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.MarshalTest<Efl.Canvas.Object, Efl.Eo.NonOwnTag>))] out Efl.Canvas.Object pivot, out double cx, out double cy);
155 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");
156 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)
158 Eina.Log.Debug("function efl_animation_scale_get was called");
159 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
160 if(wrapper != null) {
161 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);
163 ((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);
164 } catch (Exception e) {
165 Eina.Log.Warning($"Callback error: {e.ToString()}");
166 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
169 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);
172 private static efl_animation_scale_get_delegate efl_animation_scale_get_static_delegate;
175 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.MarshalTest<Efl.Canvas.Object, Efl.Eo.NonOwnTag>))] Efl.Canvas.Object pivot, double cx, double cy);
178 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.MarshalTest<Efl.Canvas.Object, Efl.Eo.NonOwnTag>))] Efl.Canvas.Object pivot, double cx, double cy);
179 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");
180 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)
182 Eina.Log.Debug("function efl_animation_scale_set was called");
183 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
184 if(wrapper != null) {
187 ((AnimationScale)wrapper).SetScale( from_scale_x, from_scale_y, to_scale_x, to_scale_y, pivot, cx, cy);
188 } catch (Exception e) {
189 Eina.Log.Warning($"Callback error: {e.ToString()}");
190 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
193 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);
196 private static efl_animation_scale_set_delegate efl_animation_scale_set_static_delegate;
199 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);
202 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);
203 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");
204 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)
206 Eina.Log.Debug("function efl_animation_scale_absolute_get was called");
207 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
208 if(wrapper != null) {
209 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);
211 ((AnimationScale)wrapper).GetScaleAbsolute( out from_scale_x, out from_scale_y, out to_scale_x, out to_scale_y, out cx, out cy);
212 } catch (Exception e) {
213 Eina.Log.Warning($"Callback error: {e.ToString()}");
214 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
217 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);
220 private static efl_animation_scale_absolute_get_delegate efl_animation_scale_absolute_get_static_delegate;
223 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);
226 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);
227 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");
228 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)
230 Eina.Log.Debug("function efl_animation_scale_absolute_set was called");
231 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
232 if(wrapper != null) {
235 ((AnimationScale)wrapper).SetScaleAbsolute( from_scale_x, from_scale_y, to_scale_x, to_scale_y, cx, cy);
236 } catch (Exception e) {
237 Eina.Log.Warning($"Callback error: {e.ToString()}");
238 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
241 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);
244 private static efl_animation_scale_absolute_set_delegate efl_animation_scale_absolute_set_static_delegate;