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 vectopr graphics gradient abstract class</summary>
15 [Efl.Canvas.Vg.Gradient.NativeMethods]
16 [Efl.Eo.BindingEntity]
17 public abstract class Gradient : Efl.Canvas.Vg.Node, Efl.Gfx.IGradient
19 ///<summary>Pointer to the native class description.</summary>
20 public override System.IntPtr NativeClass
24 if (((object)this).GetType() == typeof(Gradient))
26 return GetEflClassStatic();
30 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
35 [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
36 efl_canvas_vg_gradient_class_get();
37 /// <summary>Initializes a new instance of the <see cref="Gradient"/> class.</summary>
38 /// <param name="parent">Parent instance.</param>
39 public Gradient(Efl.Object parent= null
40 ) : base(efl_canvas_vg_gradient_class_get(), parent)
42 FinishInstantiation();
45 /// <summary>Constructor to be used when objects are expected to be constructed from native code.</summary>
46 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
47 protected Gradient(ConstructingHandle ch) : base(ch)
51 /// <summary>Initializes a new instance of the <see cref="Gradient"/> class.
52 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
53 /// <param name="wh">The native pointer to be wrapped.</param>
54 protected Gradient(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
58 [Efl.Eo.PrivateNativeClass]
59 private class GradientRealized : Gradient
61 private GradientRealized(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
65 /// <summary>Initializes a new instance of the <see cref="Gradient"/> class.
66 /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
67 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
68 /// <param name="parent">The Efl.Object parent of this instance.</param>
69 protected Gradient(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent)
73 /// <summary>Get the list of color stops.</summary>
74 /// <param name="colors">Color stops list</param>
75 /// <param name="length">Length of the list</param>
76 virtual public void GetStop(out Efl.Gfx.GradientStop colors, out uint length) {
77 var _out_colors = new System.IntPtr();
78 Efl.Gfx.IGradientConcrete.NativeMethods.efl_gfx_gradient_stop_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),out _out_colors, out length);
79 Eina.Error.RaiseIfUnhandledException();
80 colors = Eina.PrimitiveConversion.PointerToManaged<Efl.Gfx.GradientStop>(_out_colors);
82 /// <summary>Set the list of color stops for the gradient</summary>
83 /// <param name="colors">Color stops list</param>
84 /// <param name="length">Length of the list</param>
85 virtual public void SetStop(ref Efl.Gfx.GradientStop colors, uint length) {
86 Efl.Gfx.GradientStop.NativeStruct _in_colors = colors;
87 Efl.Gfx.IGradientConcrete.NativeMethods.efl_gfx_gradient_stop_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),ref _in_colors, length);
88 Eina.Error.RaiseIfUnhandledException();
91 /// <summary>Returns the spread method use by this gradient. The default is EFL_GFX_GRADIENT_SPREAD_PAD.</summary>
92 /// <returns>Spread type to be used</returns>
93 virtual public Efl.Gfx.GradientSpread GetSpread() {
94 var _ret_var = Efl.Gfx.IGradientConcrete.NativeMethods.efl_gfx_gradient_spread_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)));
95 Eina.Error.RaiseIfUnhandledException();
98 /// <summary>Specifies the spread method that should be used for this gradient.</summary>
99 /// <param name="s">Spread type to be used</param>
100 virtual public void SetSpread(Efl.Gfx.GradientSpread s) {
101 Efl.Gfx.IGradientConcrete.NativeMethods.efl_gfx_gradient_spread_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),s);
102 Eina.Error.RaiseIfUnhandledException();
104 /// <summary>Returns the spread method use by this gradient. The default is EFL_GFX_GRADIENT_SPREAD_PAD.</summary>
105 /// <value>Spread type to be used</value>
106 public Efl.Gfx.GradientSpread Spread {
107 get { return GetSpread(); }
108 set { SetSpread(value); }
110 private static IntPtr GetEflClassStatic()
112 return Efl.Canvas.Vg.Gradient.efl_canvas_vg_gradient_class_get();
114 /// <summary>Wrapper for native methods and virtual method delegates.
115 /// For internal use by generated code only.</summary>
116 public new class NativeMethods : Efl.Canvas.Vg.Node.NativeMethods
118 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Evas);
119 /// <summary>Gets the list of Eo operations to override.</summary>
120 /// <returns>The list of Eo operations to be overload.</returns>
121 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
123 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
124 var methods = Efl.Eo.Globals.GetUserMethods(type);
126 if (efl_gfx_gradient_stop_get_static_delegate == null)
128 efl_gfx_gradient_stop_get_static_delegate = new efl_gfx_gradient_stop_get_delegate(stop_get);
131 if (methods.FirstOrDefault(m => m.Name == "GetStop") != null)
133 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_gradient_stop_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_gradient_stop_get_static_delegate) });
136 if (efl_gfx_gradient_stop_set_static_delegate == null)
138 efl_gfx_gradient_stop_set_static_delegate = new efl_gfx_gradient_stop_set_delegate(stop_set);
141 if (methods.FirstOrDefault(m => m.Name == "SetStop") != null)
143 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_gradient_stop_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_gradient_stop_set_static_delegate) });
146 if (efl_gfx_gradient_spread_get_static_delegate == null)
148 efl_gfx_gradient_spread_get_static_delegate = new efl_gfx_gradient_spread_get_delegate(spread_get);
151 if (methods.FirstOrDefault(m => m.Name == "GetSpread") != null)
153 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_gradient_spread_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_gradient_spread_get_static_delegate) });
156 if (efl_gfx_gradient_spread_set_static_delegate == null)
158 efl_gfx_gradient_spread_set_static_delegate = new efl_gfx_gradient_spread_set_delegate(spread_set);
161 if (methods.FirstOrDefault(m => m.Name == "SetSpread") != null)
163 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_gfx_gradient_spread_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_gradient_spread_set_static_delegate) });
166 descs.AddRange(base.GetEoOps(type));
169 /// <summary>Returns the Eo class for the native methods of this class.</summary>
170 /// <returns>The native class pointer.</returns>
171 public override IntPtr GetEflClass()
173 return Efl.Canvas.Vg.Gradient.efl_canvas_vg_gradient_class_get();
176 #pragma warning disable CA1707, CS1591, SA1300, SA1600
179 private delegate void efl_gfx_gradient_stop_get_delegate(System.IntPtr obj, System.IntPtr pd, out System.IntPtr colors, out uint length);
182 public delegate void efl_gfx_gradient_stop_get_api_delegate(System.IntPtr obj, out System.IntPtr colors, out uint length);
184 public static Efl.Eo.FunctionWrapper<efl_gfx_gradient_stop_get_api_delegate> efl_gfx_gradient_stop_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_gradient_stop_get_api_delegate>(Module, "efl_gfx_gradient_stop_get");
186 private static void stop_get(System.IntPtr obj, System.IntPtr pd, out System.IntPtr colors, out uint length)
188 Eina.Log.Debug("function efl_gfx_gradient_stop_get was called");
189 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
192 Efl.Gfx.GradientStop _out_colors = default(Efl.Gfx.GradientStop);
193 length = default(uint);
196 ((Gradient)ws.Target).GetStop(out _out_colors, out length);
200 Eina.Log.Warning($"Callback error: {e.ToString()}");
201 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
204 colors = Eina.PrimitiveConversion.ManagedToPointerAlloc(_out_colors);
209 efl_gfx_gradient_stop_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out colors, out length);
213 private static efl_gfx_gradient_stop_get_delegate efl_gfx_gradient_stop_get_static_delegate;
216 private delegate void efl_gfx_gradient_stop_set_delegate(System.IntPtr obj, System.IntPtr pd, ref Efl.Gfx.GradientStop.NativeStruct colors, uint length);
219 public delegate void efl_gfx_gradient_stop_set_api_delegate(System.IntPtr obj, ref Efl.Gfx.GradientStop.NativeStruct colors, uint length);
221 public static Efl.Eo.FunctionWrapper<efl_gfx_gradient_stop_set_api_delegate> efl_gfx_gradient_stop_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_gradient_stop_set_api_delegate>(Module, "efl_gfx_gradient_stop_set");
223 private static void stop_set(System.IntPtr obj, System.IntPtr pd, ref Efl.Gfx.GradientStop.NativeStruct colors, uint length)
225 Eina.Log.Debug("function efl_gfx_gradient_stop_set was called");
226 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
229 Efl.Gfx.GradientStop _in_colors = colors;
233 ((Gradient)ws.Target).SetStop(ref _in_colors, length);
237 Eina.Log.Warning($"Callback error: {e.ToString()}");
238 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
246 efl_gfx_gradient_stop_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), ref colors, length);
250 private static efl_gfx_gradient_stop_set_delegate efl_gfx_gradient_stop_set_static_delegate;
253 private delegate Efl.Gfx.GradientSpread efl_gfx_gradient_spread_get_delegate(System.IntPtr obj, System.IntPtr pd);
256 public delegate Efl.Gfx.GradientSpread efl_gfx_gradient_spread_get_api_delegate(System.IntPtr obj);
258 public static Efl.Eo.FunctionWrapper<efl_gfx_gradient_spread_get_api_delegate> efl_gfx_gradient_spread_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_gradient_spread_get_api_delegate>(Module, "efl_gfx_gradient_spread_get");
260 private static Efl.Gfx.GradientSpread spread_get(System.IntPtr obj, System.IntPtr pd)
262 Eina.Log.Debug("function efl_gfx_gradient_spread_get was called");
263 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
266 Efl.Gfx.GradientSpread _ret_var = default(Efl.Gfx.GradientSpread);
269 _ret_var = ((Gradient)ws.Target).GetSpread();
273 Eina.Log.Warning($"Callback error: {e.ToString()}");
274 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
282 return efl_gfx_gradient_spread_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
286 private static efl_gfx_gradient_spread_get_delegate efl_gfx_gradient_spread_get_static_delegate;
289 private delegate void efl_gfx_gradient_spread_set_delegate(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.GradientSpread s);
292 public delegate void efl_gfx_gradient_spread_set_api_delegate(System.IntPtr obj, Efl.Gfx.GradientSpread s);
294 public static Efl.Eo.FunctionWrapper<efl_gfx_gradient_spread_set_api_delegate> efl_gfx_gradient_spread_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_gradient_spread_set_api_delegate>(Module, "efl_gfx_gradient_spread_set");
296 private static void spread_set(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.GradientSpread s)
298 Eina.Log.Debug("function efl_gfx_gradient_spread_set was called");
299 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
305 ((Gradient)ws.Target).SetSpread(s);
309 Eina.Log.Warning($"Callback error: {e.ToString()}");
310 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
317 efl_gfx_gradient_spread_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), s);
321 private static efl_gfx_gradient_spread_set_delegate efl_gfx_gradient_spread_set_static_delegate;
323 #pragma warning restore CA1707, CS1591, SA1300, SA1600