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>Elementary progressbar internal part class</summary>
13 [Efl.Ui.ProgressbarPart.NativeMethods]
14 public class ProgressbarPart : Efl.Ui.LayoutPart, Efl.Ui.IRangeDisplay
16 ///<summary>Pointer to the native class description.</summary>
17 public override System.IntPtr NativeClass
21 if (((object)this).GetType() == typeof(ProgressbarPart))
23 return GetEflClassStatic();
27 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
32 [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
33 efl_ui_progressbar_part_class_get();
34 /// <summary>Initializes a new instance of the <see cref="ProgressbarPart"/> class.</summary>
35 /// <param name="parent">Parent instance.</param>
36 public ProgressbarPart(Efl.Object parent= null
37 ) : base(efl_ui_progressbar_part_class_get(), typeof(ProgressbarPart), parent)
39 FinishInstantiation();
42 /// <summary>Initializes a new instance of the <see cref="ProgressbarPart"/> class.
43 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
44 /// <param name="raw">The native pointer to be wrapped.</param>
45 protected ProgressbarPart(System.IntPtr raw) : base(raw)
49 /// <summary>Initializes a new instance of the <see cref="ProgressbarPart"/> class.
50 /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
51 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
52 /// <param name="managedType">The managed type of the public constructor that originated this call.</param>
53 /// <param name="parent">The Efl.Object parent of this instance.</param>
54 protected ProgressbarPart(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
58 /// <summary>Control the range value (in percentage) on a given range widget
59 /// Use this call to set range levels.
61 /// Note: If you pass a value out of the specified interval for <c>val</c>, it will be interpreted as the closest of the boundary values in the interval.</summary>
62 /// <returns>The range value (must be between $0.0 and 1.0)</returns>
63 virtual public double GetRangeValue() {
64 var _ret_var = Efl.Ui.IRangeDisplayConcrete.NativeMethods.efl_ui_range_value_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle));
65 Eina.Error.RaiseIfUnhandledException();
68 /// <summary>Control the range value (in percentage) on a given range widget
69 /// Use this call to set range levels.
71 /// Note: If you pass a value out of the specified interval for <c>val</c>, it will be interpreted as the closest of the boundary values in the interval.</summary>
72 /// <param name="val">The range value (must be between $0.0 and 1.0)</param>
73 virtual public void SetRangeValue(double val) {
74 Efl.Ui.IRangeDisplayConcrete.NativeMethods.efl_ui_range_value_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),val);
75 Eina.Error.RaiseIfUnhandledException();
77 /// <summary>Get the minimum and maximum values of the given range widget.
78 /// Note: If only one value is needed, the other pointer can be passed as <c>null</c>.</summary>
79 /// <param name="min">The minimum value.</param>
80 /// <param name="max">The maximum value.</param>
81 virtual public void GetRangeLimits(out double min, out double max) {
82 Efl.Ui.IRangeDisplayConcrete.NativeMethods.efl_ui_range_limits_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),out min, out max);
83 Eina.Error.RaiseIfUnhandledException();
85 /// <summary>Set the minimum and maximum values for given range widget.
86 /// Define the allowed range of values to be selected by the user.
88 /// If actual value is less than <c>min</c>, it will be updated to <c>min</c>. If it is bigger then <c>max</c>, will be updated to <c>max</c>. The actual value can be obtained with <see cref="Efl.Ui.IRangeDisplay.GetRangeValue"/>
90 /// The minimum and maximum values may be different for each class.
92 /// Warning: maximum must be greater than minimum, otherwise behavior is undefined.</summary>
93 /// <param name="min">The minimum value.</param>
94 /// <param name="max">The maximum value.</param>
95 virtual public void SetRangeLimits(double min, double max) {
96 Efl.Ui.IRangeDisplayConcrete.NativeMethods.efl_ui_range_limits_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),min, max);
97 Eina.Error.RaiseIfUnhandledException();
99 /// <summary>Control the range value (in percentage) on a given range widget
100 /// Use this call to set range levels.
102 /// Note: If you pass a value out of the specified interval for <c>val</c>, it will be interpreted as the closest of the boundary values in the interval.</summary>
103 /// <value>The range value (must be between $0.0 and 1.0)</value>
104 public double RangeValue {
105 get { return GetRangeValue(); }
106 set { SetRangeValue(value); }
108 private static IntPtr GetEflClassStatic()
110 return Efl.Ui.ProgressbarPart.efl_ui_progressbar_part_class_get();
112 /// <summary>Wrapper for native methods and virtual method delegates.
113 /// For internal use by generated code only.</summary>
114 public new class NativeMethods : Efl.Ui.LayoutPart.NativeMethods
116 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Elementary);
117 /// <summary>Gets the list of Eo operations to override.</summary>
118 /// <returns>The list of Eo operations to be overload.</returns>
119 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
121 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
122 var methods = Efl.Eo.Globals.GetUserMethods(type);
124 if (efl_ui_range_value_get_static_delegate == null)
126 efl_ui_range_value_get_static_delegate = new efl_ui_range_value_get_delegate(range_value_get);
129 if (methods.FirstOrDefault(m => m.Name == "GetRangeValue") != null)
131 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_range_value_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_range_value_get_static_delegate) });
134 if (efl_ui_range_value_set_static_delegate == null)
136 efl_ui_range_value_set_static_delegate = new efl_ui_range_value_set_delegate(range_value_set);
139 if (methods.FirstOrDefault(m => m.Name == "SetRangeValue") != null)
141 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_range_value_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_range_value_set_static_delegate) });
144 if (efl_ui_range_limits_get_static_delegate == null)
146 efl_ui_range_limits_get_static_delegate = new efl_ui_range_limits_get_delegate(range_limits_get);
149 if (methods.FirstOrDefault(m => m.Name == "GetRangeLimits") != null)
151 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_range_limits_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_range_limits_get_static_delegate) });
154 if (efl_ui_range_limits_set_static_delegate == null)
156 efl_ui_range_limits_set_static_delegate = new efl_ui_range_limits_set_delegate(range_limits_set);
159 if (methods.FirstOrDefault(m => m.Name == "SetRangeLimits") != null)
161 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_range_limits_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_range_limits_set_static_delegate) });
164 descs.AddRange(base.GetEoOps(type));
167 /// <summary>Returns the Eo class for the native methods of this class.</summary>
168 /// <returns>The native class pointer.</returns>
169 public override IntPtr GetEflClass()
171 return Efl.Ui.ProgressbarPart.efl_ui_progressbar_part_class_get();
174 #pragma warning disable CA1707, CS1591, SA1300, SA1600
177 private delegate double efl_ui_range_value_get_delegate(System.IntPtr obj, System.IntPtr pd);
180 public delegate double efl_ui_range_value_get_api_delegate(System.IntPtr obj);
182 public static Efl.Eo.FunctionWrapper<efl_ui_range_value_get_api_delegate> efl_ui_range_value_get_ptr = new Efl.Eo.FunctionWrapper<efl_ui_range_value_get_api_delegate>(Module, "efl_ui_range_value_get");
184 private static double range_value_get(System.IntPtr obj, System.IntPtr pd)
186 Eina.Log.Debug("function efl_ui_range_value_get was called");
187 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
190 double _ret_var = default(double);
193 _ret_var = ((ProgressbarPart)ws.Target).GetRangeValue();
197 Eina.Log.Warning($"Callback error: {e.ToString()}");
198 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
206 return efl_ui_range_value_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
210 private static efl_ui_range_value_get_delegate efl_ui_range_value_get_static_delegate;
213 private delegate void efl_ui_range_value_set_delegate(System.IntPtr obj, System.IntPtr pd, double val);
216 public delegate void efl_ui_range_value_set_api_delegate(System.IntPtr obj, double val);
218 public static Efl.Eo.FunctionWrapper<efl_ui_range_value_set_api_delegate> efl_ui_range_value_set_ptr = new Efl.Eo.FunctionWrapper<efl_ui_range_value_set_api_delegate>(Module, "efl_ui_range_value_set");
220 private static void range_value_set(System.IntPtr obj, System.IntPtr pd, double val)
222 Eina.Log.Debug("function efl_ui_range_value_set was called");
223 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
229 ((ProgressbarPart)ws.Target).SetRangeValue(val);
233 Eina.Log.Warning($"Callback error: {e.ToString()}");
234 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
241 efl_ui_range_value_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), val);
245 private static efl_ui_range_value_set_delegate efl_ui_range_value_set_static_delegate;
248 private delegate void efl_ui_range_limits_get_delegate(System.IntPtr obj, System.IntPtr pd, out double min, out double max);
251 public delegate void efl_ui_range_limits_get_api_delegate(System.IntPtr obj, out double min, out double max);
253 public static Efl.Eo.FunctionWrapper<efl_ui_range_limits_get_api_delegate> efl_ui_range_limits_get_ptr = new Efl.Eo.FunctionWrapper<efl_ui_range_limits_get_api_delegate>(Module, "efl_ui_range_limits_get");
255 private static void range_limits_get(System.IntPtr obj, System.IntPtr pd, out double min, out double max)
257 Eina.Log.Debug("function efl_ui_range_limits_get was called");
258 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
261 min = default(double); max = default(double);
264 ((ProgressbarPart)ws.Target).GetRangeLimits(out min, out max);
268 Eina.Log.Warning($"Callback error: {e.ToString()}");
269 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
276 efl_ui_range_limits_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out min, out max);
280 private static efl_ui_range_limits_get_delegate efl_ui_range_limits_get_static_delegate;
283 private delegate void efl_ui_range_limits_set_delegate(System.IntPtr obj, System.IntPtr pd, double min, double max);
286 public delegate void efl_ui_range_limits_set_api_delegate(System.IntPtr obj, double min, double max);
288 public static Efl.Eo.FunctionWrapper<efl_ui_range_limits_set_api_delegate> efl_ui_range_limits_set_ptr = new Efl.Eo.FunctionWrapper<efl_ui_range_limits_set_api_delegate>(Module, "efl_ui_range_limits_set");
290 private static void range_limits_set(System.IntPtr obj, System.IntPtr pd, double min, double max)
292 Eina.Log.Debug("function efl_ui_range_limits_set was called");
293 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
299 ((ProgressbarPart)ws.Target).SetRangeLimits(min, max);
303 Eina.Log.Warning($"Callback error: {e.ToString()}");
304 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
311 efl_ui_range_limits_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), min, max);
315 private static efl_ui_range_limits_set_delegate efl_ui_range_limits_set_static_delegate;
317 #pragma warning restore CA1707, CS1591, SA1300, SA1600