2 #pragma warning disable CS1591
4 using System.Runtime.InteropServices;
5 using System.Collections.Generic;
7 using System.Threading;
8 using System.ComponentModel;
15 /// <summary>Efl vector graphics gradient linear class</summary>
16 /// <remarks>This is a <b>BETA</b> class. It can be modified or removed in the future. Do not use it for product development.</remarks>
17 [Efl.Canvas.Vg.GradientLinear.NativeMethods]
18 [Efl.Eo.BindingEntity]
19 public class GradientLinear : Efl.Canvas.Vg.Gradient, Efl.Gfx.IGradientLinear
21 /// <summary>Pointer to the native class description.</summary>
22 public override System.IntPtr NativeClass
26 if (((object)this).GetType() == typeof(GradientLinear))
28 return GetEflClassStatic();
32 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
37 [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
38 efl_canvas_vg_gradient_linear_class_get();
39 /// <summary>Initializes a new instance of the <see cref="GradientLinear"/> class.</summary>
40 /// <param name="parent">Parent instance.</param>
41 public GradientLinear(Efl.Object parent= null
42 ) : base(efl_canvas_vg_gradient_linear_class_get(), parent)
44 FinishInstantiation();
47 /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
48 /// Do not call this constructor directly.</summary>
49 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
50 protected GradientLinear(ConstructingHandle ch) : base(ch)
54 /// <summary>Initializes a new instance of the <see cref="GradientLinear"/> class.
55 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
56 /// <param name="wh">The native pointer to be wrapped.</param>
57 protected GradientLinear(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
61 /// <summary>Initializes a new instance of the <see cref="GradientLinear"/> class.
62 /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
63 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
64 /// <param name="parent">The Efl.Object parent of this instance.</param>
65 protected GradientLinear(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent)
69 /// <summary>Gets the start point of this linear gradient.</summary>
70 /// <param name="x">X co-ordinate of start point</param>
71 /// <param name="y">Y co-ordinate of start point</param>
72 virtual public void GetStart(out double x, out double y) {
73 Efl.Gfx.IGradientLinearConcrete.NativeMethods.efl_gfx_gradient_linear_start_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),out x, out y);
74 Eina.Error.RaiseIfUnhandledException();
76 /// <summary>Sets the start point of this linear gradient.</summary>
77 /// <param name="x">X co-ordinate of start point</param>
78 /// <param name="y">Y co-ordinate of start point</param>
79 virtual public void SetStart(double x, double y) {
80 Efl.Gfx.IGradientLinearConcrete.NativeMethods.efl_gfx_gradient_linear_start_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),x, y);
81 Eina.Error.RaiseIfUnhandledException();
83 /// <summary>Gets the end point of this linear gradient.</summary>
84 /// <param name="x">X co-ordinate of end point</param>
85 /// <param name="y">Y co-ordinate of end point</param>
86 virtual public void GetEnd(out double x, out double y) {
87 Efl.Gfx.IGradientLinearConcrete.NativeMethods.efl_gfx_gradient_linear_end_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),out x, out y);
88 Eina.Error.RaiseIfUnhandledException();
90 /// <summary>Sets the end point of this linear gradient.</summary>
91 /// <param name="x">X co-ordinate of end point</param>
92 /// <param name="y">Y co-ordinate of end point</param>
93 virtual public void SetEnd(double x, double y) {
94 Efl.Gfx.IGradientLinearConcrete.NativeMethods.efl_gfx_gradient_linear_end_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),x, y);
95 Eina.Error.RaiseIfUnhandledException();
97 /// <summary>Gets the start point of this linear gradient.</summary>
98 /// <value>X co-ordinate of start point</value>
99 public (double, double) Start {
101 double _out_x = default(double);
102 double _out_y = default(double);
103 GetStart(out _out_x,out _out_y);
104 return (_out_x,_out_y);
106 set { SetStart( value.Item1, value.Item2); }
108 /// <summary>Gets the end point of this linear gradient.</summary>
109 /// <value>X co-ordinate of end point</value>
110 public (double, double) End {
112 double _out_x = default(double);
113 double _out_y = default(double);
114 GetEnd(out _out_x,out _out_y);
115 return (_out_x,_out_y);
117 set { SetEnd( value.Item1, value.Item2); }
119 private static IntPtr GetEflClassStatic()
121 return Efl.Canvas.Vg.GradientLinear.efl_canvas_vg_gradient_linear_class_get();
123 /// <summary>Wrapper for native methods and virtual method delegates.
124 /// For internal use by generated code only.</summary>
125 public new class NativeMethods : Efl.Canvas.Vg.Gradient.NativeMethods
127 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Evas);
128 /// <summary>Gets the list of Eo operations to override.</summary>
129 /// <returns>The list of Eo operations to be overload.</returns>
130 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
132 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
133 var methods = Efl.Eo.Globals.GetUserMethods(type);
135 if (efl_gfx_gradient_linear_start_get_static_delegate == null)
137 efl_gfx_gradient_linear_start_get_static_delegate = new efl_gfx_gradient_linear_start_get_delegate(start_get);
140 if (methods.FirstOrDefault(m => m.Name == "GetStart") != null)
142 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) });
145 if (efl_gfx_gradient_linear_start_set_static_delegate == null)
147 efl_gfx_gradient_linear_start_set_static_delegate = new efl_gfx_gradient_linear_start_set_delegate(start_set);
150 if (methods.FirstOrDefault(m => m.Name == "SetStart") != null)
152 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) });
155 if (efl_gfx_gradient_linear_end_get_static_delegate == null)
157 efl_gfx_gradient_linear_end_get_static_delegate = new efl_gfx_gradient_linear_end_get_delegate(end_get);
160 if (methods.FirstOrDefault(m => m.Name == "GetEnd") != null)
162 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) });
165 if (efl_gfx_gradient_linear_end_set_static_delegate == null)
167 efl_gfx_gradient_linear_end_set_static_delegate = new efl_gfx_gradient_linear_end_set_delegate(end_set);
170 if (methods.FirstOrDefault(m => m.Name == "SetEnd") != null)
172 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) });
175 descs.AddRange(base.GetEoOps(type));
178 /// <summary>Returns the Eo class for the native methods of this class.</summary>
179 /// <returns>The native class pointer.</returns>
180 public override IntPtr GetEflClass()
182 return Efl.Canvas.Vg.GradientLinear.efl_canvas_vg_gradient_linear_class_get();
185 #pragma warning disable CA1707, CS1591, SA1300, SA1600
188 private delegate void efl_gfx_gradient_linear_start_get_delegate(System.IntPtr obj, System.IntPtr pd, out double x, out double y);
191 public delegate void efl_gfx_gradient_linear_start_get_api_delegate(System.IntPtr obj, out double x, out double y);
193 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");
195 private static void start_get(System.IntPtr obj, System.IntPtr pd, out double x, out double y)
197 Eina.Log.Debug("function efl_gfx_gradient_linear_start_get was called");
198 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
201 x = default(double); y = default(double);
204 ((GradientLinear)ws.Target).GetStart(out x, out y);
208 Eina.Log.Warning($"Callback error: {e.ToString()}");
209 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
216 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);
220 private static efl_gfx_gradient_linear_start_get_delegate efl_gfx_gradient_linear_start_get_static_delegate;
223 private delegate void efl_gfx_gradient_linear_start_set_delegate(System.IntPtr obj, System.IntPtr pd, double x, double y);
226 public delegate void efl_gfx_gradient_linear_start_set_api_delegate(System.IntPtr obj, double x, double y);
228 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");
230 private static void start_set(System.IntPtr obj, System.IntPtr pd, double x, double y)
232 Eina.Log.Debug("function efl_gfx_gradient_linear_start_set was called");
233 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
239 ((GradientLinear)ws.Target).SetStart(x, y);
243 Eina.Log.Warning($"Callback error: {e.ToString()}");
244 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
251 efl_gfx_gradient_linear_start_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), x, y);
255 private static efl_gfx_gradient_linear_start_set_delegate efl_gfx_gradient_linear_start_set_static_delegate;
258 private delegate void efl_gfx_gradient_linear_end_get_delegate(System.IntPtr obj, System.IntPtr pd, out double x, out double y);
261 public delegate void efl_gfx_gradient_linear_end_get_api_delegate(System.IntPtr obj, out double x, out double y);
263 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");
265 private static void end_get(System.IntPtr obj, System.IntPtr pd, out double x, out double y)
267 Eina.Log.Debug("function efl_gfx_gradient_linear_end_get was called");
268 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
271 x = default(double); y = default(double);
274 ((GradientLinear)ws.Target).GetEnd(out x, out y);
278 Eina.Log.Warning($"Callback error: {e.ToString()}");
279 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
286 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);
290 private static efl_gfx_gradient_linear_end_get_delegate efl_gfx_gradient_linear_end_get_static_delegate;
293 private delegate void efl_gfx_gradient_linear_end_set_delegate(System.IntPtr obj, System.IntPtr pd, double x, double y);
296 public delegate void efl_gfx_gradient_linear_end_set_api_delegate(System.IntPtr obj, double x, double y);
298 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");
300 private static void end_set(System.IntPtr obj, System.IntPtr pd, double x, double y)
302 Eina.Log.Debug("function efl_gfx_gradient_linear_end_set was called");
303 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
309 ((GradientLinear)ws.Target).SetEnd(x, y);
313 Eina.Log.Warning($"Callback error: {e.ToString()}");
314 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
321 efl_gfx_gradient_linear_end_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), x, y);
325 private static efl_gfx_gradient_linear_end_set_delegate efl_gfx_gradient_linear_end_set_static_delegate;
327 #pragma warning restore CA1707, CS1591, SA1300, SA1600
338 #pragma warning disable CS1591
339 public static class Efl_Canvas_VgGradientLinear_ExtensionMethods {
343 #pragma warning restore CS1591