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 interface</summary>
13 [Efl.Gfx.IGradientConcrete.NativeMethods]
14 [Efl.Eo.BindingEntity]
15 public interface IGradient :
16 Efl.Eo.IWrapper, IDisposable
18 /// <summary>Get the list of color stops.</summary>
19 /// <param name="colors">Color stops list</param>
20 /// <param name="length">Length of the list</param>
21 void GetStop(out Efl.Gfx.GradientStop colors, out uint length);
22 /// <summary>Set the list of color stops for the gradient</summary>
23 /// <param name="colors">Color stops list</param>
24 /// <param name="length">Length of the list</param>
25 void SetStop(ref Efl.Gfx.GradientStop colors, uint length);
26 /// <summary>Returns the spread method use by this gradient. The default is EFL_GFX_GRADIENT_SPREAD_PAD.</summary>
27 /// <returns>Spread type to be used</returns>
28 Efl.Gfx.GradientSpread GetSpread();
29 /// <summary>Specifies the spread method that should be used for this gradient.</summary>
30 /// <param name="s">Spread type to be used</param>
31 void SetSpread(Efl.Gfx.GradientSpread s);
32 /// <summary>Returns the spread method use by this gradient. The default is EFL_GFX_GRADIENT_SPREAD_PAD.</summary>
33 /// <value>Spread type to be used</value>
34 Efl.Gfx.GradientSpread Spread {
39 /// <summary>Efl graphics gradient interface</summary>
40 sealed public class IGradientConcrete :
45 ///<summary>Pointer to the native class description.</summary>
46 public override System.IntPtr NativeClass
50 if (((object)this).GetType() == typeof(IGradientConcrete))
52 return GetEflClassStatic();
56 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
61 /// <summary>Constructor to be used when objects are expected to be constructed from native code.</summary>
62 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
63 private IGradientConcrete(ConstructingHandle ch) : base(ch)
67 [System.Runtime.InteropServices.DllImport("libefl.so.1")] internal static extern System.IntPtr
68 efl_gfx_gradient_interface_get();
69 /// <summary>Initializes a new instance of the <see cref="IGradient"/> class.
70 /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
71 /// <param name="wh">The native pointer to be wrapped.</param>
72 private IGradientConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
76 /// <summary>Get the list of color stops.</summary>
77 /// <param name="colors">Color stops list</param>
78 /// <param name="length">Length of the list</param>
79 public void GetStop(out Efl.Gfx.GradientStop colors, out uint length) {
80 var _out_colors = new System.IntPtr();
81 Efl.Gfx.IGradientConcrete.NativeMethods.efl_gfx_gradient_stop_get_ptr.Value.Delegate(this.NativeHandle,out _out_colors, out length);
82 Eina.Error.RaiseIfUnhandledException();
83 colors = Eina.PrimitiveConversion.PointerToManaged<Efl.Gfx.GradientStop>(_out_colors);
85 /// <summary>Set the list of color stops for the gradient</summary>
86 /// <param name="colors">Color stops list</param>
87 /// <param name="length">Length of the list</param>
88 public void SetStop(ref Efl.Gfx.GradientStop colors, uint length) {
89 Efl.Gfx.GradientStop.NativeStruct _in_colors = colors;
90 Efl.Gfx.IGradientConcrete.NativeMethods.efl_gfx_gradient_stop_set_ptr.Value.Delegate(this.NativeHandle,ref _in_colors, length);
91 Eina.Error.RaiseIfUnhandledException();
94 /// <summary>Returns the spread method use by this gradient. The default is EFL_GFX_GRADIENT_SPREAD_PAD.</summary>
95 /// <returns>Spread type to be used</returns>
96 public Efl.Gfx.GradientSpread GetSpread() {
97 var _ret_var = Efl.Gfx.IGradientConcrete.NativeMethods.efl_gfx_gradient_spread_get_ptr.Value.Delegate(this.NativeHandle);
98 Eina.Error.RaiseIfUnhandledException();
101 /// <summary>Specifies the spread method that should be used for this gradient.</summary>
102 /// <param name="s">Spread type to be used</param>
103 public void SetSpread(Efl.Gfx.GradientSpread s) {
104 Efl.Gfx.IGradientConcrete.NativeMethods.efl_gfx_gradient_spread_set_ptr.Value.Delegate(this.NativeHandle,s);
105 Eina.Error.RaiseIfUnhandledException();
107 /// <summary>Returns the spread method use by this gradient. The default is EFL_GFX_GRADIENT_SPREAD_PAD.</summary>
108 /// <value>Spread type to be used</value>
109 public Efl.Gfx.GradientSpread Spread {
110 get { return GetSpread(); }
111 set { SetSpread(value); }
113 private static IntPtr GetEflClassStatic()
115 return Efl.Gfx.IGradientConcrete.efl_gfx_gradient_interface_get();
117 /// <summary>Wrapper for native methods and virtual method delegates.
118 /// For internal use by generated code only.</summary>
119 public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
121 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Efl);
122 /// <summary>Gets the list of Eo operations to override.</summary>
123 /// <returns>The list of Eo operations to be overload.</returns>
124 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
126 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
127 var methods = Efl.Eo.Globals.GetUserMethods(type);
129 if (efl_gfx_gradient_stop_get_static_delegate == null)
131 efl_gfx_gradient_stop_get_static_delegate = new efl_gfx_gradient_stop_get_delegate(stop_get);
134 if (methods.FirstOrDefault(m => m.Name == "GetStop") != null)
136 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) });
139 if (efl_gfx_gradient_stop_set_static_delegate == null)
141 efl_gfx_gradient_stop_set_static_delegate = new efl_gfx_gradient_stop_set_delegate(stop_set);
144 if (methods.FirstOrDefault(m => m.Name == "SetStop") != null)
146 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) });
149 if (efl_gfx_gradient_spread_get_static_delegate == null)
151 efl_gfx_gradient_spread_get_static_delegate = new efl_gfx_gradient_spread_get_delegate(spread_get);
154 if (methods.FirstOrDefault(m => m.Name == "GetSpread") != null)
156 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) });
159 if (efl_gfx_gradient_spread_set_static_delegate == null)
161 efl_gfx_gradient_spread_set_static_delegate = new efl_gfx_gradient_spread_set_delegate(spread_set);
164 if (methods.FirstOrDefault(m => m.Name == "SetSpread") != null)
166 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) });
171 /// <summary>Returns the Eo class for the native methods of this class.</summary>
172 /// <returns>The native class pointer.</returns>
173 public override IntPtr GetEflClass()
175 return Efl.Gfx.IGradientConcrete.efl_gfx_gradient_interface_get();
178 #pragma warning disable CA1707, CS1591, SA1300, SA1600
181 private delegate void efl_gfx_gradient_stop_get_delegate(System.IntPtr obj, System.IntPtr pd, out System.IntPtr colors, out uint length);
184 public delegate void efl_gfx_gradient_stop_get_api_delegate(System.IntPtr obj, out System.IntPtr colors, out uint length);
186 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");
188 private static void stop_get(System.IntPtr obj, System.IntPtr pd, out System.IntPtr colors, out uint length)
190 Eina.Log.Debug("function efl_gfx_gradient_stop_get was called");
191 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
194 Efl.Gfx.GradientStop _out_colors = default(Efl.Gfx.GradientStop);
195 length = default(uint);
198 ((IGradient)ws.Target).GetStop(out _out_colors, out length);
202 Eina.Log.Warning($"Callback error: {e.ToString()}");
203 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
206 colors = Eina.PrimitiveConversion.ManagedToPointerAlloc(_out_colors);
211 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);
215 private static efl_gfx_gradient_stop_get_delegate efl_gfx_gradient_stop_get_static_delegate;
218 private delegate void efl_gfx_gradient_stop_set_delegate(System.IntPtr obj, System.IntPtr pd, ref Efl.Gfx.GradientStop.NativeStruct colors, uint length);
221 public delegate void efl_gfx_gradient_stop_set_api_delegate(System.IntPtr obj, ref Efl.Gfx.GradientStop.NativeStruct colors, uint length);
223 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");
225 private static void stop_set(System.IntPtr obj, System.IntPtr pd, ref Efl.Gfx.GradientStop.NativeStruct colors, uint length)
227 Eina.Log.Debug("function efl_gfx_gradient_stop_set was called");
228 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
231 Efl.Gfx.GradientStop _in_colors = colors;
235 ((IGradient)ws.Target).SetStop(ref _in_colors, length);
239 Eina.Log.Warning($"Callback error: {e.ToString()}");
240 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
248 efl_gfx_gradient_stop_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), ref colors, length);
252 private static efl_gfx_gradient_stop_set_delegate efl_gfx_gradient_stop_set_static_delegate;
255 private delegate Efl.Gfx.GradientSpread efl_gfx_gradient_spread_get_delegate(System.IntPtr obj, System.IntPtr pd);
258 public delegate Efl.Gfx.GradientSpread efl_gfx_gradient_spread_get_api_delegate(System.IntPtr obj);
260 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");
262 private static Efl.Gfx.GradientSpread spread_get(System.IntPtr obj, System.IntPtr pd)
264 Eina.Log.Debug("function efl_gfx_gradient_spread_get was called");
265 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
268 Efl.Gfx.GradientSpread _ret_var = default(Efl.Gfx.GradientSpread);
271 _ret_var = ((IGradient)ws.Target).GetSpread();
275 Eina.Log.Warning($"Callback error: {e.ToString()}");
276 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
284 return efl_gfx_gradient_spread_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
288 private static efl_gfx_gradient_spread_get_delegate efl_gfx_gradient_spread_get_static_delegate;
291 private delegate void efl_gfx_gradient_spread_set_delegate(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.GradientSpread s);
294 public delegate void efl_gfx_gradient_spread_set_api_delegate(System.IntPtr obj, Efl.Gfx.GradientSpread s);
296 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");
298 private static void spread_set(System.IntPtr obj, System.IntPtr pd, Efl.Gfx.GradientSpread s)
300 Eina.Log.Debug("function efl_gfx_gradient_spread_set was called");
301 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
307 ((IGradient)ws.Target).SetSpread(s);
311 Eina.Log.Warning($"Callback error: {e.ToString()}");
312 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
319 efl_gfx_gradient_spread_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), s);
323 private static efl_gfx_gradient_spread_set_delegate efl_gfx_gradient_spread_set_static_delegate;
325 #pragma warning restore CA1707, CS1591, SA1300, SA1600