1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.ComponentModel;
7 namespace Efl { namespace Canvas { namespace Vg {
8 /// <summary>Efl vector graphics gradient linear class</summary>
9 [GradientLinearNativeInherit]
10 public class GradientLinear : Efl.Canvas.Vg.Gradient, Efl.Eo.IWrapper,Efl.Gfx.GradientLinear
12 public new static System.IntPtr klass = System.IntPtr.Zero;
13 public new static Efl.Canvas.Vg.GradientLinearNativeInherit nativeInherit = new Efl.Canvas.Vg.GradientLinearNativeInherit();
14 ///<summary>Pointer to the native class description.</summary>
15 public override System.IntPtr NativeClass {
17 if (((object)this).GetType() == typeof (GradientLinear))
18 return Efl.Canvas.Vg.GradientLinearNativeInherit.GetEflClassStatic();
20 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
23 [System.Runtime.InteropServices.DllImport(efl.Libs.Evas)] internal static extern System.IntPtr
24 efl_canvas_vg_gradient_linear_class_get();
25 ///<summary>Creates a new instance.</summary>
26 ///<param name="parent">Parent instance.</param>
27 public GradientLinear(Efl.Object parent= null
29 base(efl_canvas_vg_gradient_linear_class_get(), typeof(GradientLinear), parent)
31 FinishInstantiation();
33 ///<summary>Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
34 public GradientLinear(System.IntPtr raw) : base(raw)
36 register_event_proxies();
38 ///<summary>Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
39 protected GradientLinear(IntPtr base_klass, System.Type managed_type, Efl.Object parent) : base(base_klass, managed_type, parent) {}
40 ///<summary>Casts obj into an instance of this type.</summary>
41 public new static GradientLinear static_cast(Efl.Object obj)
44 throw new System.ArgumentNullException("obj");
45 return new GradientLinear(obj.NativeHandle);
47 ///<summary>Verifies if the given object is equal to this one.</summary>
48 public override bool Equals(object obj)
50 var other = obj as Efl.Object;
53 return this.NativeHandle == other.NativeHandle;
55 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
56 public override int GetHashCode()
58 return this.NativeHandle.ToInt32();
60 ///<summary>Turns the native pointer into a string representation.</summary>
61 public override String ToString()
63 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
65 protected override void register_event_proxies()
67 base.register_event_proxies();
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 /// <returns></returns>
73 virtual public void GetStart( out double x, out double y) {
74 Efl.Gfx.GradientLinearNativeInherit.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);
75 Eina.Error.RaiseIfUnhandledException();
77 /// <summary>Sets the start point of this linear gradient.</summary>
78 /// <param name="x">X co-ordinate of start point</param>
79 /// <param name="y">Y co-ordinate of start point</param>
80 /// <returns></returns>
81 virtual public void SetStart( double x, double y) {
82 Efl.Gfx.GradientLinearNativeInherit.efl_gfx_gradient_linear_start_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), x, y);
83 Eina.Error.RaiseIfUnhandledException();
85 /// <summary>Gets the end point of this linear gradient.</summary>
86 /// <param name="x">X co-ordinate of end point</param>
87 /// <param name="y">Y co-ordinate of end point</param>
88 /// <returns></returns>
89 virtual public void GetEnd( out double x, out double y) {
90 Efl.Gfx.GradientLinearNativeInherit.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);
91 Eina.Error.RaiseIfUnhandledException();
93 /// <summary>Sets the end point of this linear gradient.</summary>
94 /// <param name="x">X co-ordinate of end point</param>
95 /// <param name="y">Y co-ordinate of end point</param>
96 /// <returns></returns>
97 virtual public void SetEnd( double x, double y) {
98 Efl.Gfx.GradientLinearNativeInherit.efl_gfx_gradient_linear_end_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle), x, y);
99 Eina.Error.RaiseIfUnhandledException();
101 private static new IntPtr GetEflClassStatic()
103 return Efl.Canvas.Vg.GradientLinear.efl_canvas_vg_gradient_linear_class_get();
106 public class GradientLinearNativeInherit : Efl.Canvas.Vg.GradientNativeInherit{
107 public new static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Evas);
108 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
110 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
111 if (efl_gfx_gradient_linear_start_get_static_delegate == null)
112 efl_gfx_gradient_linear_start_get_static_delegate = new efl_gfx_gradient_linear_start_get_delegate(start_get);
113 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)
115 efl_gfx_gradient_linear_start_set_static_delegate = new efl_gfx_gradient_linear_start_set_delegate(start_set);
116 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)});
117 if (efl_gfx_gradient_linear_end_get_static_delegate == null)
118 efl_gfx_gradient_linear_end_get_static_delegate = new efl_gfx_gradient_linear_end_get_delegate(end_get);
119 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)});
120 if (efl_gfx_gradient_linear_end_set_static_delegate == null)
121 efl_gfx_gradient_linear_end_set_static_delegate = new efl_gfx_gradient_linear_end_set_delegate(end_set);
122 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)});
123 descs.AddRange(base.GetEoOps(type));
126 public override IntPtr GetEflClass()
128 return Efl.Canvas.Vg.GradientLinear.efl_canvas_vg_gradient_linear_class_get();
130 public static new IntPtr GetEflClassStatic()
132 return Efl.Canvas.Vg.GradientLinear.efl_canvas_vg_gradient_linear_class_get();
136 private delegate void efl_gfx_gradient_linear_start_get_delegate(System.IntPtr obj, System.IntPtr pd, out double x, out double y);
139 public delegate void efl_gfx_gradient_linear_start_get_api_delegate(System.IntPtr obj, out double x, out double y);
140 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");
141 private static void start_get(System.IntPtr obj, System.IntPtr pd, out double x, out double y)
143 Eina.Log.Debug("function efl_gfx_gradient_linear_start_get was called");
144 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
145 if(wrapper != null) {
146 x = default(double); y = default(double);
148 ((GradientLinear)wrapper).GetStart( out x, out y);
149 } catch (Exception e) {
150 Eina.Log.Warning($"Callback error: {e.ToString()}");
151 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
154 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);
157 private static efl_gfx_gradient_linear_start_get_delegate efl_gfx_gradient_linear_start_get_static_delegate;
160 private delegate void efl_gfx_gradient_linear_start_set_delegate(System.IntPtr obj, System.IntPtr pd, double x, double y);
163 public delegate void efl_gfx_gradient_linear_start_set_api_delegate(System.IntPtr obj, double x, double y);
164 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");
165 private static void start_set(System.IntPtr obj, System.IntPtr pd, double x, double y)
167 Eina.Log.Debug("function efl_gfx_gradient_linear_start_set was called");
168 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
169 if(wrapper != null) {
172 ((GradientLinear)wrapper).SetStart( x, y);
173 } catch (Exception e) {
174 Eina.Log.Warning($"Callback error: {e.ToString()}");
175 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
178 efl_gfx_gradient_linear_start_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), x, y);
181 private static efl_gfx_gradient_linear_start_set_delegate efl_gfx_gradient_linear_start_set_static_delegate;
184 private delegate void efl_gfx_gradient_linear_end_get_delegate(System.IntPtr obj, System.IntPtr pd, out double x, out double y);
187 public delegate void efl_gfx_gradient_linear_end_get_api_delegate(System.IntPtr obj, out double x, out double y);
188 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");
189 private static void end_get(System.IntPtr obj, System.IntPtr pd, out double x, out double y)
191 Eina.Log.Debug("function efl_gfx_gradient_linear_end_get was called");
192 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
193 if(wrapper != null) {
194 x = default(double); y = default(double);
196 ((GradientLinear)wrapper).GetEnd( out x, out y);
197 } catch (Exception e) {
198 Eina.Log.Warning($"Callback error: {e.ToString()}");
199 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
202 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);
205 private static efl_gfx_gradient_linear_end_get_delegate efl_gfx_gradient_linear_end_get_static_delegate;
208 private delegate void efl_gfx_gradient_linear_end_set_delegate(System.IntPtr obj, System.IntPtr pd, double x, double y);
211 public delegate void efl_gfx_gradient_linear_end_set_api_delegate(System.IntPtr obj, double x, double y);
212 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");
213 private static void end_set(System.IntPtr obj, System.IntPtr pd, double x, double y)
215 Eina.Log.Debug("function efl_gfx_gradient_linear_end_set was called");
216 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
217 if(wrapper != null) {
220 ((GradientLinear)wrapper).SetEnd( x, y);
221 } catch (Exception e) {
222 Eina.Log.Warning($"Callback error: {e.ToString()}");
223 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
226 efl_gfx_gradient_linear_end_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), x, y);
229 private static efl_gfx_gradient_linear_end_set_delegate efl_gfx_gradient_linear_end_set_static_delegate;