1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.Threading;
7 using System.ComponentModel;
14 /// <summary>Efl vector graphics gradient linear class</summary>
15 [Efl.Canvas.Vg.GradientLinear.NativeMethods]
16 public class GradientLinear : Efl.Canvas.Vg.Gradient, Efl.Gfx.IGradientLinear
18 ///<summary>Pointer to the native class description.</summary>
19 public override System.IntPtr NativeClass
23 if (((object)this).GetType() == typeof(GradientLinear))
25 return GetEflClassStatic();
29 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
34 [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
35 efl_canvas_vg_gradient_linear_class_get();
36 /// <summary>Initializes a new instance of the <see cref="GradientLinear"/> class.</summary>
37 /// <param name="parent">Parent instance.</param>
38 public GradientLinear(Efl.Object parent= null
39 ) : base(efl_canvas_vg_gradient_linear_class_get(), typeof(GradientLinear), parent)
41 FinishInstantiation();
44 /// <summary>Initializes a new instance of the <see cref="GradientLinear"/> class.
45 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
46 /// <param name="raw">The native pointer to be wrapped.</param>
47 protected GradientLinear(System.IntPtr raw) : base(raw)
51 /// <summary>Initializes a new instance of the <see cref="GradientLinear"/> class.
52 /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
53 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
54 /// <param name="managedType">The managed type of the public constructor that originated this call.</param>
55 /// <param name="parent">The Efl.Object parent of this instance.</param>
56 protected GradientLinear(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
60 /// <summary>Gets the start point of this linear gradient.</summary>
61 /// <param name="x">X co-ordinate of start point</param>
62 /// <param name="y">Y co-ordinate of start point</param>
63 virtual public void GetStart(out double x, out double y) {
64 Efl.Gfx.IGradientLinearConcrete.NativeMethods.efl_gfx_gradient_linear_start_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),out x, out y);
65 Eina.Error.RaiseIfUnhandledException();
67 /// <summary>Sets the start point of this linear gradient.</summary>
68 /// <param name="x">X co-ordinate of start point</param>
69 /// <param name="y">Y co-ordinate of start point</param>
70 virtual public void SetStart(double x, double y) {
71 Efl.Gfx.IGradientLinearConcrete.NativeMethods.efl_gfx_gradient_linear_start_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),x, y);
72 Eina.Error.RaiseIfUnhandledException();
74 /// <summary>Gets the end point of this linear gradient.</summary>
75 /// <param name="x">X co-ordinate of end point</param>
76 /// <param name="y">Y co-ordinate of end point</param>
77 virtual public void GetEnd(out double x, out double y) {
78 Efl.Gfx.IGradientLinearConcrete.NativeMethods.efl_gfx_gradient_linear_end_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),out x, out y);
79 Eina.Error.RaiseIfUnhandledException();
81 /// <summary>Sets the end point of this linear gradient.</summary>
82 /// <param name="x">X co-ordinate of end point</param>
83 /// <param name="y">Y co-ordinate of end point</param>
84 virtual public void SetEnd(double x, double y) {
85 Efl.Gfx.IGradientLinearConcrete.NativeMethods.efl_gfx_gradient_linear_end_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),x, y);
86 Eina.Error.RaiseIfUnhandledException();
88 private static IntPtr GetEflClassStatic()
90 return Efl.Canvas.Vg.GradientLinear.efl_canvas_vg_gradient_linear_class_get();
92 /// <summary>Wrapper for native methods and virtual method delegates.
93 /// For internal use by generated code only.</summary>
94 public new class NativeMethods : Efl.Canvas.Vg.Gradient.NativeMethods
96 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Evas);
97 /// <summary>Gets the list of Eo operations to override.</summary>
98 /// <returns>The list of Eo operations to be overload.</returns>
99 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
101 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
102 var methods = Efl.Eo.Globals.GetUserMethods(type);
104 if (efl_gfx_gradient_linear_start_get_static_delegate == null)
106 efl_gfx_gradient_linear_start_get_static_delegate = new efl_gfx_gradient_linear_start_get_delegate(start_get);
109 if (methods.FirstOrDefault(m => m.Name == "GetStart") != null)
111 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_gradient_linear_start_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_gradient_linear_start_get_static_delegate) });
114 if (efl_gfx_gradient_linear_start_set_static_delegate == null)
116 efl_gfx_gradient_linear_start_set_static_delegate = new efl_gfx_gradient_linear_start_set_delegate(start_set);
119 if (methods.FirstOrDefault(m => m.Name == "SetStart") != null)
121 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_gradient_linear_start_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_gradient_linear_start_set_static_delegate) });
124 if (efl_gfx_gradient_linear_end_get_static_delegate == null)
126 efl_gfx_gradient_linear_end_get_static_delegate = new efl_gfx_gradient_linear_end_get_delegate(end_get);
129 if (methods.FirstOrDefault(m => m.Name == "GetEnd") != null)
131 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_gradient_linear_end_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_gradient_linear_end_get_static_delegate) });
134 if (efl_gfx_gradient_linear_end_set_static_delegate == null)
136 efl_gfx_gradient_linear_end_set_static_delegate = new efl_gfx_gradient_linear_end_set_delegate(end_set);
139 if (methods.FirstOrDefault(m => m.Name == "SetEnd") != null)
141 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_gradient_linear_end_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_gradient_linear_end_set_static_delegate) });
144 descs.AddRange(base.GetEoOps(type));
147 /// <summary>Returns the Eo class for the native methods of this class.</summary>
148 /// <returns>The native class pointer.</returns>
149 public override IntPtr GetEflClass()
151 return Efl.Canvas.Vg.GradientLinear.efl_canvas_vg_gradient_linear_class_get();
154 #pragma warning disable CA1707, CS1591, SA1300, SA1600
157 private delegate void efl_gfx_gradient_linear_start_get_delegate(System.IntPtr obj, System.IntPtr pd, out double x, out double y);
160 public delegate void efl_gfx_gradient_linear_start_get_api_delegate(System.IntPtr obj, out double x, out double y);
162 public static Efl.Eo.FunctionWrapper<efl_gfx_gradient_linear_start_get_api_delegate> efl_gfx_gradient_linear_start_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_gradient_linear_start_get_api_delegate>(Module, "efl_gfx_gradient_linear_start_get");
164 private static void start_get(System.IntPtr obj, System.IntPtr pd, out double x, out double y)
166 Eina.Log.Debug("function efl_gfx_gradient_linear_start_get was called");
167 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
170 x = default(double); y = default(double);
173 ((GradientLinear)ws.Target).GetStart(out x, out y);
177 Eina.Log.Warning($"Callback error: {e.ToString()}");
178 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
185 efl_gfx_gradient_linear_start_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out x, out y);
189 private static efl_gfx_gradient_linear_start_get_delegate efl_gfx_gradient_linear_start_get_static_delegate;
192 private delegate void efl_gfx_gradient_linear_start_set_delegate(System.IntPtr obj, System.IntPtr pd, double x, double y);
195 public delegate void efl_gfx_gradient_linear_start_set_api_delegate(System.IntPtr obj, double x, double y);
197 public static Efl.Eo.FunctionWrapper<efl_gfx_gradient_linear_start_set_api_delegate> efl_gfx_gradient_linear_start_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_gradient_linear_start_set_api_delegate>(Module, "efl_gfx_gradient_linear_start_set");
199 private static void start_set(System.IntPtr obj, System.IntPtr pd, double x, double y)
201 Eina.Log.Debug("function efl_gfx_gradient_linear_start_set was called");
202 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
208 ((GradientLinear)ws.Target).SetStart(x, y);
212 Eina.Log.Warning($"Callback error: {e.ToString()}");
213 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
220 efl_gfx_gradient_linear_start_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), x, y);
224 private static efl_gfx_gradient_linear_start_set_delegate efl_gfx_gradient_linear_start_set_static_delegate;
227 private delegate void efl_gfx_gradient_linear_end_get_delegate(System.IntPtr obj, System.IntPtr pd, out double x, out double y);
230 public delegate void efl_gfx_gradient_linear_end_get_api_delegate(System.IntPtr obj, out double x, out double y);
232 public static Efl.Eo.FunctionWrapper<efl_gfx_gradient_linear_end_get_api_delegate> efl_gfx_gradient_linear_end_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_gradient_linear_end_get_api_delegate>(Module, "efl_gfx_gradient_linear_end_get");
234 private static void end_get(System.IntPtr obj, System.IntPtr pd, out double x, out double y)
236 Eina.Log.Debug("function efl_gfx_gradient_linear_end_get was called");
237 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
240 x = default(double); y = default(double);
243 ((GradientLinear)ws.Target).GetEnd(out x, out y);
247 Eina.Log.Warning($"Callback error: {e.ToString()}");
248 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
255 efl_gfx_gradient_linear_end_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out x, out y);
259 private static efl_gfx_gradient_linear_end_get_delegate efl_gfx_gradient_linear_end_get_static_delegate;
262 private delegate void efl_gfx_gradient_linear_end_set_delegate(System.IntPtr obj, System.IntPtr pd, double x, double y);
265 public delegate void efl_gfx_gradient_linear_end_set_api_delegate(System.IntPtr obj, double x, double y);
267 public static Efl.Eo.FunctionWrapper<efl_gfx_gradient_linear_end_set_api_delegate> efl_gfx_gradient_linear_end_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_gradient_linear_end_set_api_delegate>(Module, "efl_gfx_gradient_linear_end_set");
269 private static void end_set(System.IntPtr obj, System.IntPtr pd, double x, double y)
271 Eina.Log.Debug("function efl_gfx_gradient_linear_end_set was called");
272 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
278 ((GradientLinear)ws.Target).SetEnd(x, y);
282 Eina.Log.Warning($"Callback error: {e.ToString()}");
283 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
290 efl_gfx_gradient_linear_end_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), x, y);
294 private static efl_gfx_gradient_linear_end_set_delegate efl_gfx_gradient_linear_end_set_static_delegate;
296 #pragma warning restore CA1707, CS1591, SA1300, SA1600