1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.Threading;
7 using System.ComponentModel;
12 /// <summary>Efl graphics gradient linear interface</summary>
13 [Efl.Gfx.IGradientLinearConcrete.NativeMethods]
14 [Efl.Eo.BindingEntity]
15 public interface IGradientLinear :
17 Efl.Eo.IWrapper, IDisposable
19 /// <summary>Gets the start point of this linear gradient.</summary>
20 /// <param name="x">X co-ordinate of start point</param>
21 /// <param name="y">Y co-ordinate of start point</param>
22 void GetStart(out double x, out double y);
23 /// <summary>Sets the start point of this linear gradient.</summary>
24 /// <param name="x">X co-ordinate of start point</param>
25 /// <param name="y">Y co-ordinate of start point</param>
26 void SetStart(double x, double y);
27 /// <summary>Gets the end point of this linear gradient.</summary>
28 /// <param name="x">X co-ordinate of end point</param>
29 /// <param name="y">Y co-ordinate of end point</param>
30 void GetEnd(out double x, out double y);
31 /// <summary>Sets the end point of this linear gradient.</summary>
32 /// <param name="x">X co-ordinate of end point</param>
33 /// <param name="y">Y co-ordinate of end point</param>
34 void SetEnd(double x, double y);
36 /// <summary>Efl graphics gradient linear interface</summary>
37 sealed public class IGradientLinearConcrete :
42 ///<summary>Pointer to the native class description.</summary>
43 public override System.IntPtr NativeClass
47 if (((object)this).GetType() == typeof(IGradientLinearConcrete))
49 return GetEflClassStatic();
53 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
58 /// <summary>Constructor to be used when objects are expected to be constructed from native code.</summary>
59 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
60 private IGradientLinearConcrete(ConstructingHandle ch) : base(ch)
64 [System.Runtime.InteropServices.DllImport("libefl.so.1")] internal static extern System.IntPtr
65 efl_gfx_gradient_linear_interface_get();
66 /// <summary>Initializes a new instance of the <see cref="IGradientLinear"/> class.
67 /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
68 /// <param name="wh">The native pointer to be wrapped.</param>
69 private IGradientLinearConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
73 /// <summary>Gets the start point of this linear gradient.</summary>
74 /// <param name="x">X co-ordinate of start point</param>
75 /// <param name="y">Y co-ordinate of start point</param>
76 public void GetStart(out double x, out double y) {
77 Efl.Gfx.IGradientLinearConcrete.NativeMethods.efl_gfx_gradient_linear_start_get_ptr.Value.Delegate(this.NativeHandle,out x, out y);
78 Eina.Error.RaiseIfUnhandledException();
80 /// <summary>Sets the start point of this linear gradient.</summary>
81 /// <param name="x">X co-ordinate of start point</param>
82 /// <param name="y">Y co-ordinate of start point</param>
83 public void SetStart(double x, double y) {
84 Efl.Gfx.IGradientLinearConcrete.NativeMethods.efl_gfx_gradient_linear_start_set_ptr.Value.Delegate(this.NativeHandle,x, y);
85 Eina.Error.RaiseIfUnhandledException();
87 /// <summary>Gets the end point of this linear gradient.</summary>
88 /// <param name="x">X co-ordinate of end point</param>
89 /// <param name="y">Y co-ordinate of end point</param>
90 public void GetEnd(out double x, out double y) {
91 Efl.Gfx.IGradientLinearConcrete.NativeMethods.efl_gfx_gradient_linear_end_get_ptr.Value.Delegate(this.NativeHandle,out x, out y);
92 Eina.Error.RaiseIfUnhandledException();
94 /// <summary>Sets the end point of this linear gradient.</summary>
95 /// <param name="x">X co-ordinate of end point</param>
96 /// <param name="y">Y co-ordinate of end point</param>
97 public void SetEnd(double x, double y) {
98 Efl.Gfx.IGradientLinearConcrete.NativeMethods.efl_gfx_gradient_linear_end_set_ptr.Value.Delegate(this.NativeHandle,x, y);
99 Eina.Error.RaiseIfUnhandledException();
101 /// <summary>Get the list of color stops.</summary>
102 /// <param name="colors">Color stops list</param>
103 /// <param name="length">Length of the list</param>
104 public void GetStop(out Efl.Gfx.GradientStop colors, out uint length) {
105 var _out_colors = new System.IntPtr();
106 Efl.Gfx.IGradientConcrete.NativeMethods.efl_gfx_gradient_stop_get_ptr.Value.Delegate(this.NativeHandle,out _out_colors, out length);
107 Eina.Error.RaiseIfUnhandledException();
108 colors = Eina.PrimitiveConversion.PointerToManaged<Efl.Gfx.GradientStop>(_out_colors);
110 /// <summary>Set the list of color stops for the gradient</summary>
111 /// <param name="colors">Color stops list</param>
112 /// <param name="length">Length of the list</param>
113 public void SetStop(ref Efl.Gfx.GradientStop colors, uint length) {
114 Efl.Gfx.GradientStop.NativeStruct _in_colors = colors;
115 Efl.Gfx.IGradientConcrete.NativeMethods.efl_gfx_gradient_stop_set_ptr.Value.Delegate(this.NativeHandle,ref _in_colors, length);
116 Eina.Error.RaiseIfUnhandledException();
119 /// <summary>Returns the spread method use by this gradient. The default is EFL_GFX_GRADIENT_SPREAD_PAD.</summary>
120 /// <returns>Spread type to be used</returns>
121 public Efl.Gfx.GradientSpread GetSpread() {
122 var _ret_var = Efl.Gfx.IGradientConcrete.NativeMethods.efl_gfx_gradient_spread_get_ptr.Value.Delegate(this.NativeHandle);
123 Eina.Error.RaiseIfUnhandledException();
126 /// <summary>Specifies the spread method that should be used for this gradient.</summary>
127 /// <param name="s">Spread type to be used</param>
128 public void SetSpread(Efl.Gfx.GradientSpread s) {
129 Efl.Gfx.IGradientConcrete.NativeMethods.efl_gfx_gradient_spread_set_ptr.Value.Delegate(this.NativeHandle,s);
130 Eina.Error.RaiseIfUnhandledException();
132 /// <summary>Returns the spread method use by this gradient. The default is EFL_GFX_GRADIENT_SPREAD_PAD.</summary>
133 /// <value>Spread type to be used</value>
134 public Efl.Gfx.GradientSpread Spread {
135 get { return GetSpread(); }
136 set { SetSpread(value); }
138 private static IntPtr GetEflClassStatic()
140 return Efl.Gfx.IGradientLinearConcrete.efl_gfx_gradient_linear_interface_get();
142 /// <summary>Wrapper for native methods and virtual method delegates.
143 /// For internal use by generated code only.</summary>
144 public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
146 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Efl);
147 /// <summary>Gets the list of Eo operations to override.</summary>
148 /// <returns>The list of Eo operations to be overload.</returns>
149 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
151 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
152 var methods = Efl.Eo.Globals.GetUserMethods(type);
154 if (efl_gfx_gradient_linear_start_get_static_delegate == null)
156 efl_gfx_gradient_linear_start_get_static_delegate = new efl_gfx_gradient_linear_start_get_delegate(start_get);
159 if (methods.FirstOrDefault(m => m.Name == "GetStart") != null)
161 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) });
164 if (efl_gfx_gradient_linear_start_set_static_delegate == null)
166 efl_gfx_gradient_linear_start_set_static_delegate = new efl_gfx_gradient_linear_start_set_delegate(start_set);
169 if (methods.FirstOrDefault(m => m.Name == "SetStart") != null)
171 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) });
174 if (efl_gfx_gradient_linear_end_get_static_delegate == null)
176 efl_gfx_gradient_linear_end_get_static_delegate = new efl_gfx_gradient_linear_end_get_delegate(end_get);
179 if (methods.FirstOrDefault(m => m.Name == "GetEnd") != null)
181 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) });
184 if (efl_gfx_gradient_linear_end_set_static_delegate == null)
186 efl_gfx_gradient_linear_end_set_static_delegate = new efl_gfx_gradient_linear_end_set_delegate(end_set);
189 if (methods.FirstOrDefault(m => m.Name == "SetEnd") != null)
191 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) });
194 if (efl_gfx_gradient_stop_get_static_delegate == null)
196 efl_gfx_gradient_stop_get_static_delegate = new efl_gfx_gradient_stop_get_delegate(stop_get);
199 if (methods.FirstOrDefault(m => m.Name == "GetStop") != null)
201 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) });
204 if (efl_gfx_gradient_stop_set_static_delegate == null)
206 efl_gfx_gradient_stop_set_static_delegate = new efl_gfx_gradient_stop_set_delegate(stop_set);
209 if (methods.FirstOrDefault(m => m.Name == "SetStop") != null)
211 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) });
214 if (efl_gfx_gradient_spread_get_static_delegate == null)
216 efl_gfx_gradient_spread_get_static_delegate = new efl_gfx_gradient_spread_get_delegate(spread_get);
219 if (methods.FirstOrDefault(m => m.Name == "GetSpread") != null)
221 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) });
224 if (efl_gfx_gradient_spread_set_static_delegate == null)
226 efl_gfx_gradient_spread_set_static_delegate = new efl_gfx_gradient_spread_set_delegate(spread_set);
229 if (methods.FirstOrDefault(m => m.Name == "SetSpread") != null)
231 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) });
236 /// <summary>Returns the Eo class for the native methods of this class.</summary>
237 /// <returns>The native class pointer.</returns>
238 public override IntPtr GetEflClass()
240 return Efl.Gfx.IGradientLinearConcrete.efl_gfx_gradient_linear_interface_get();
243 #pragma warning disable CA1707, CS1591, SA1300, SA1600
246 private delegate void efl_gfx_gradient_linear_start_get_delegate(System.IntPtr obj, System.IntPtr pd, out double x, out double y);
249 public delegate void efl_gfx_gradient_linear_start_get_api_delegate(System.IntPtr obj, out double x, out double y);
251 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");
253 private static void start_get(System.IntPtr obj, System.IntPtr pd, out double x, out double y)
255 Eina.Log.Debug("function efl_gfx_gradient_linear_start_get was called");
256 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
259 x = default(double); y = default(double);
262 ((IGradientLinear)ws.Target).GetStart(out x, out y);
266 Eina.Log.Warning($"Callback error: {e.ToString()}");
267 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
274 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);
278 private static efl_gfx_gradient_linear_start_get_delegate efl_gfx_gradient_linear_start_get_static_delegate;
281 private delegate void efl_gfx_gradient_linear_start_set_delegate(System.IntPtr obj, System.IntPtr pd, double x, double y);
284 public delegate void efl_gfx_gradient_linear_start_set_api_delegate(System.IntPtr obj, double x, double y);
286 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");
288 private static void start_set(System.IntPtr obj, System.IntPtr pd, double x, double y)
290 Eina.Log.Debug("function efl_gfx_gradient_linear_start_set was called");
291 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
297 ((IGradientLinear)ws.Target).SetStart(x, y);
301 Eina.Log.Warning($"Callback error: {e.ToString()}");
302 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
309 efl_gfx_gradient_linear_start_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), x, y);
313 private static efl_gfx_gradient_linear_start_set_delegate efl_gfx_gradient_linear_start_set_static_delegate;
316 private delegate void efl_gfx_gradient_linear_end_get_delegate(System.IntPtr obj, System.IntPtr pd, out double x, out double y);
319 public delegate void efl_gfx_gradient_linear_end_get_api_delegate(System.IntPtr obj, out double x, out double y);
321 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");
323 private static void end_get(System.IntPtr obj, System.IntPtr pd, out double x, out double y)
325 Eina.Log.Debug("function efl_gfx_gradient_linear_end_get was called");
326 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
329 x = default(double); y = default(double);
332 ((IGradientLinear)ws.Target).GetEnd(out x, out y);
336 Eina.Log.Warning($"Callback error: {e.ToString()}");
337 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
344 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);
348 private static efl_gfx_gradient_linear_end_get_delegate efl_gfx_gradient_linear_end_get_static_delegate;
351 private delegate void efl_gfx_gradient_linear_end_set_delegate(System.IntPtr obj, System.IntPtr pd, double x, double y);
354 public delegate void efl_gfx_gradient_linear_end_set_api_delegate(System.IntPtr obj, double x, double y);
356 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");
358 private static void end_set(System.IntPtr obj, System.IntPtr pd, double x, double y)
360 Eina.Log.Debug("function efl_gfx_gradient_linear_end_set was called");
361 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
367 ((IGradientLinear)ws.Target).SetEnd(x, y);
371 Eina.Log.Warning($"Callback error: {e.ToString()}");
372 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
379 efl_gfx_gradient_linear_end_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), x, y);
383 private static efl_gfx_gradient_linear_end_set_delegate efl_gfx_gradient_linear_end_set_static_delegate;
386 private delegate void efl_gfx_gradient_stop_get_delegate(System.IntPtr obj, System.IntPtr pd, out System.IntPtr colors, out uint length);
389 public delegate void efl_gfx_gradient_stop_get_api_delegate(System.IntPtr obj, out System.IntPtr colors, out uint length);
391 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");
393 private static void stop_get(System.IntPtr obj, System.IntPtr pd, out System.IntPtr colors, out uint length)
395 Eina.Log.Debug("function efl_gfx_gradient_stop_get was called");
396 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
399 Efl.Gfx.GradientStop _out_colors = default(Efl.Gfx.GradientStop);
400 length = default(uint);
403 ((IGradientLinear)ws.Target).GetStop(out _out_colors, out length);
407 Eina.Log.Warning($"Callback error: {e.ToString()}");
408 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
411 colors = Eina.PrimitiveConversion.ManagedToPointerAlloc(_out_colors);
416 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);
420 private static efl_gfx_gradient_stop_get_delegate efl_gfx_gradient_stop_get_static_delegate;
423 private delegate void efl_gfx_gradient_stop_set_delegate(System.IntPtr obj, System.IntPtr pd, ref Efl.Gfx.GradientStop.NativeStruct colors, uint length);
426 public delegate void efl_gfx_gradient_stop_set_api_delegate(System.IntPtr obj, ref Efl.Gfx.GradientStop.NativeStruct colors, uint length);
428 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");
430 private static void stop_set(System.IntPtr obj, System.IntPtr pd, ref Efl.Gfx.GradientStop.NativeStruct colors, uint length)
432 Eina.Log.Debug("function efl_gfx_gradient_stop_set was called");
433 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
436 Efl.Gfx.GradientStop _in_colors = colors;
440 ((IGradientLinear)ws.Target).SetStop(ref _in_colors, length);
444 Eina.Log.Warning($"Callback error: {e.ToString()}");
445 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
453 efl_gfx_gradient_stop_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), ref colors, length);
457 private static efl_gfx_gradient_stop_set_delegate efl_gfx_gradient_stop_set_static_delegate;
460 private delegate Efl.Gfx.GradientSpread efl_gfx_gradient_spread_get_delegate(System.IntPtr obj, System.IntPtr pd);
463 public delegate Efl.Gfx.GradientSpread efl_gfx_gradient_spread_get_api_delegate(System.IntPtr obj);
465 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");
467 private static Efl.Gfx.GradientSpread spread_get(System.IntPtr obj, System.IntPtr pd)
469 Eina.Log.Debug("function efl_gfx_gradient_spread_get was called");
470 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
473 Efl.Gfx.GradientSpread _ret_var = default(Efl.Gfx.GradientSpread);
476 _ret_var = ((IGradientLinear)ws.Target).GetSpread();
480 Eina.Log.Warning($"Callback error: {e.ToString()}");
481 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
489 return efl_gfx_gradient_spread_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
493 private static efl_gfx_gradient_spread_get_delegate efl_gfx_gradient_spread_get_static_delegate;
496 private delegate void efl_gfx_gradient_spread_set_delegate(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.GradientSpread s);
499 public delegate void efl_gfx_gradient_spread_set_api_delegate(System.IntPtr obj, Efl.Gfx.GradientSpread s);
501 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");
503 private static void spread_set(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.GradientSpread s)
505 Eina.Log.Debug("function efl_gfx_gradient_spread_set was called");
506 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
512 ((IGradientLinear)ws.Target).SetSpread(s);
516 Eina.Log.Warning($"Callback error: {e.ToString()}");
517 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
524 efl_gfx_gradient_spread_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), s);
528 private static efl_gfx_gradient_spread_set_delegate efl_gfx_gradient_spread_set_static_delegate;
530 #pragma warning restore CA1707, CS1591, SA1300, SA1600