2b3ee4465bd31f25dc740f020e480688752c1a76
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_linear_interpolator.eo.cs
1 #pragma warning disable CS1591
2 using System;
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
5 using System.Linq;
6 using System.Threading;
7 using System.ComponentModel;
8 namespace Efl {
9
10 /// <summary>Efl linear interpolator class</summary>
11 [Efl.LinearInterpolator.NativeMethods]
12 public class LinearInterpolator : Efl.Object, Efl.IInterpolator
13 {
14     ///<summary>Pointer to the native class description.</summary>
15     public override System.IntPtr NativeClass
16     {
17         get
18         {
19             if (((object)this).GetType() == typeof(LinearInterpolator))
20             {
21                 return GetEflClassStatic();
22             }
23             else
24             {
25                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
26             }
27         }
28     }
29
30     [System.Runtime.InteropServices.DllImport(efl.Libs.Ecore)] internal static extern System.IntPtr
31         efl_linear_interpolator_class_get();
32     /// <summary>Initializes a new instance of the <see cref="LinearInterpolator"/> class.</summary>
33     /// <param name="parent">Parent instance.</param>
34     public LinearInterpolator(Efl.Object parent= null
35             ) : base(efl_linear_interpolator_class_get(), typeof(LinearInterpolator), parent)
36     {
37         FinishInstantiation();
38     }
39
40     /// <summary>Initializes a new instance of the <see cref="LinearInterpolator"/> class.
41     /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
42     /// <param name="raw">The native pointer to be wrapped.</param>
43     protected LinearInterpolator(System.IntPtr raw) : base(raw)
44     {
45     }
46
47     /// <summary>Initializes a new instance of the <see cref="LinearInterpolator"/> class.
48     /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
49     /// <param name="baseKlass">The pointer to the base native Eo class.</param>
50     /// <param name="managedType">The managed type of the public constructor that originated this call.</param>
51     /// <param name="parent">The Efl.Object parent of this instance.</param>
52     protected LinearInterpolator(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
53     {
54     }
55
56     /// <summary>Interpolate the given value.</summary>
57     /// <param name="progress">Input value mapped from 0.0 to 1.0.</param>
58     /// <returns>Output value calculated by interpolating the input value.</returns>
59     virtual public double Interpolate(double progress) {
60                                  var _ret_var = Efl.IInterpolatorConcrete.NativeMethods.efl_interpolator_interpolate_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),progress);
61         Eina.Error.RaiseIfUnhandledException();
62                         return _ret_var;
63  }
64     private static IntPtr GetEflClassStatic()
65     {
66         return Efl.LinearInterpolator.efl_linear_interpolator_class_get();
67     }
68     /// <summary>Wrapper for native methods and virtual method delegates.
69     /// For internal use by generated code only.</summary>
70     public new class NativeMethods : Efl.Object.NativeMethods
71     {
72         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Ecore);
73         /// <summary>Gets the list of Eo operations to override.</summary>
74         /// <returns>The list of Eo operations to be overload.</returns>
75         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
76         {
77             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
78             var methods = Efl.Eo.Globals.GetUserMethods(type);
79
80             if (efl_interpolator_interpolate_static_delegate == null)
81             {
82                 efl_interpolator_interpolate_static_delegate = new efl_interpolator_interpolate_delegate(interpolate);
83             }
84
85             if (methods.FirstOrDefault(m => m.Name == "Interpolate") != null)
86             {
87                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_interpolator_interpolate"), func = Marshal.GetFunctionPointerForDelegate(efl_interpolator_interpolate_static_delegate) });
88             }
89
90             descs.AddRange(base.GetEoOps(type));
91             return descs;
92         }
93         /// <summary>Returns the Eo class for the native methods of this class.</summary>
94         /// <returns>The native class pointer.</returns>
95         public override IntPtr GetEflClass()
96         {
97             return Efl.LinearInterpolator.efl_linear_interpolator_class_get();
98         }
99
100         #pragma warning disable CA1707, CS1591, SA1300, SA1600
101
102         
103         private delegate double efl_interpolator_interpolate_delegate(System.IntPtr obj, System.IntPtr pd,  double progress);
104
105         
106         public delegate double efl_interpolator_interpolate_api_delegate(System.IntPtr obj,  double progress);
107
108         public static Efl.Eo.FunctionWrapper<efl_interpolator_interpolate_api_delegate> efl_interpolator_interpolate_ptr = new Efl.Eo.FunctionWrapper<efl_interpolator_interpolate_api_delegate>(Module, "efl_interpolator_interpolate");
109
110         private static double interpolate(System.IntPtr obj, System.IntPtr pd, double progress)
111         {
112             Eina.Log.Debug("function efl_interpolator_interpolate was called");
113             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
114             if (ws != null)
115             {
116                                     double _ret_var = default(double);
117                 try
118                 {
119                     _ret_var = ((LinearInterpolator)ws.Target).Interpolate(progress);
120                 }
121                 catch (Exception e)
122                 {
123                     Eina.Log.Warning($"Callback error: {e.ToString()}");
124                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
125                 }
126
127                         return _ret_var;
128
129             }
130             else
131             {
132                 return efl_interpolator_interpolate_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), progress);
133             }
134         }
135
136         private static efl_interpolator_interpolate_delegate efl_interpolator_interpolate_static_delegate;
137
138         #pragma warning restore CA1707, CS1591, SA1300, SA1600
139
140 }
141 }
142 }
143