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 [Efl.Eo.BindingEntity]
15 public class ProgressbarPart : Efl.Ui.LayoutPart, Efl.Ui.IRangeDisplay
17 ///<summary>Pointer to the native class description.</summary>
18 public override System.IntPtr NativeClass
22 if (((object)this).GetType() == typeof(ProgressbarPart))
24 return GetEflClassStatic();
28 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
33 [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
34 efl_ui_progressbar_part_class_get();
35 /// <summary>Initializes a new instance of the <see cref="ProgressbarPart"/> class.</summary>
36 /// <param name="parent">Parent instance.</param>
37 public ProgressbarPart(Efl.Object parent= null
38 ) : base(efl_ui_progressbar_part_class_get(), parent)
40 FinishInstantiation();
43 /// <summary>Constructor to be used when objects are expected to be constructed from native code.</summary>
44 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
45 protected ProgressbarPart(ConstructingHandle ch) : base(ch)
49 /// <summary>Initializes a new instance of the <see cref="ProgressbarPart"/> class.
50 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
51 /// <param name="wh">The native pointer to be wrapped.</param>
52 protected ProgressbarPart(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
56 /// <summary>Initializes a new instance of the <see cref="ProgressbarPart"/> class.
57 /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
58 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
59 /// <param name="parent">The Efl.Object parent of this instance.</param>
60 protected ProgressbarPart(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent)
64 /// <summary>Control the range value (in percentage) on a given range widget
65 /// Use this call to set range levels.
67 /// 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>
68 /// <returns>The range value (must be between $0.0 and 1.0)</returns>
69 virtual public double GetRangeValue() {
70 var _ret_var = Efl.Ui.IRangeDisplayConcrete.NativeMethods.efl_ui_range_value_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)));
71 Eina.Error.RaiseIfUnhandledException();
74 /// <summary>Control the range value (in percentage) on a given range widget
75 /// Use this call to set range levels.
77 /// 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>
78 /// <param name="val">The range value (must be between $0.0 and 1.0)</param>
79 virtual public void SetRangeValue(double val) {
80 Efl.Ui.IRangeDisplayConcrete.NativeMethods.efl_ui_range_value_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),val);
81 Eina.Error.RaiseIfUnhandledException();
83 /// <summary>Get the minimum and maximum values of the given range widget.
84 /// Note: If only one value is needed, the other pointer can be passed as <c>null</c>.</summary>
85 /// <param name="min">The minimum value.</param>
86 /// <param name="max">The maximum value.</param>
87 virtual public void GetRangeLimits(out double min, out double max) {
88 Efl.Ui.IRangeDisplayConcrete.NativeMethods.efl_ui_range_limits_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),out min, out max);
89 Eina.Error.RaiseIfUnhandledException();
91 /// <summary>Set the minimum and maximum values for given range widget.
92 /// Define the allowed range of values to be selected by the user.
94 /// 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"/>
96 /// The minimum and maximum values may be different for each class.
98 /// Warning: maximum must be greater than minimum, otherwise behavior is undefined.</summary>
99 /// <param name="min">The minimum value.</param>
100 /// <param name="max">The maximum value.</param>
101 virtual public void SetRangeLimits(double min, double max) {
102 Efl.Ui.IRangeDisplayConcrete.NativeMethods.efl_ui_range_limits_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),min, max);
103 Eina.Error.RaiseIfUnhandledException();
105 /// <summary>Control the range value (in percentage) on a given range widget
106 /// Use this call to set range levels.
108 /// 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>
109 /// <value>The range value (must be between $0.0 and 1.0)</value>
110 public double RangeValue {
111 get { return GetRangeValue(); }
112 set { SetRangeValue(value); }
114 private static IntPtr GetEflClassStatic()
116 return Efl.Ui.ProgressbarPart.efl_ui_progressbar_part_class_get();
118 /// <summary>Wrapper for native methods and virtual method delegates.
119 /// For internal use by generated code only.</summary>
120 public new class NativeMethods : Efl.Ui.LayoutPart.NativeMethods
122 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Elementary);
123 /// <summary>Gets the list of Eo operations to override.</summary>
124 /// <returns>The list of Eo operations to be overload.</returns>
125 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
127 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
128 var methods = Efl.Eo.Globals.GetUserMethods(type);
130 if (efl_ui_range_value_get_static_delegate == null)
132 efl_ui_range_value_get_static_delegate = new efl_ui_range_value_get_delegate(range_value_get);
135 if (methods.FirstOrDefault(m => m.Name == "GetRangeValue") != null)
137 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) });
140 if (efl_ui_range_value_set_static_delegate == null)
142 efl_ui_range_value_set_static_delegate = new efl_ui_range_value_set_delegate(range_value_set);
145 if (methods.FirstOrDefault(m => m.Name == "SetRangeValue") != null)
147 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) });
150 if (efl_ui_range_limits_get_static_delegate == null)
152 efl_ui_range_limits_get_static_delegate = new efl_ui_range_limits_get_delegate(range_limits_get);
155 if (methods.FirstOrDefault(m => m.Name == "GetRangeLimits") != null)
157 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) });
160 if (efl_ui_range_limits_set_static_delegate == null)
162 efl_ui_range_limits_set_static_delegate = new efl_ui_range_limits_set_delegate(range_limits_set);
165 if (methods.FirstOrDefault(m => m.Name == "SetRangeLimits") != null)
167 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) });
170 descs.AddRange(base.GetEoOps(type));
173 /// <summary>Returns the Eo class for the native methods of this class.</summary>
174 /// <returns>The native class pointer.</returns>
175 public override IntPtr GetEflClass()
177 return Efl.Ui.ProgressbarPart.efl_ui_progressbar_part_class_get();
180 #pragma warning disable CA1707, CS1591, SA1300, SA1600
183 private delegate double efl_ui_range_value_get_delegate(System.IntPtr obj, System.IntPtr pd);
186 public delegate double efl_ui_range_value_get_api_delegate(System.IntPtr obj);
188 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");
190 private static double range_value_get(System.IntPtr obj, System.IntPtr pd)
192 Eina.Log.Debug("function efl_ui_range_value_get was called");
193 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
196 double _ret_var = default(double);
199 _ret_var = ((ProgressbarPart)ws.Target).GetRangeValue();
203 Eina.Log.Warning($"Callback error: {e.ToString()}");
204 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
212 return efl_ui_range_value_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
216 private static efl_ui_range_value_get_delegate efl_ui_range_value_get_static_delegate;
219 private delegate void efl_ui_range_value_set_delegate(System.IntPtr obj, System.IntPtr pd, double val);
222 public delegate void efl_ui_range_value_set_api_delegate(System.IntPtr obj, double val);
224 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");
226 private static void range_value_set(System.IntPtr obj, System.IntPtr pd, double val)
228 Eina.Log.Debug("function efl_ui_range_value_set was called");
229 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
235 ((ProgressbarPart)ws.Target).SetRangeValue(val);
239 Eina.Log.Warning($"Callback error: {e.ToString()}");
240 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
247 efl_ui_range_value_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), val);
251 private static efl_ui_range_value_set_delegate efl_ui_range_value_set_static_delegate;
254 private delegate void efl_ui_range_limits_get_delegate(System.IntPtr obj, System.IntPtr pd, out double min, out double max);
257 public delegate void efl_ui_range_limits_get_api_delegate(System.IntPtr obj, out double min, out double max);
259 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");
261 private static void range_limits_get(System.IntPtr obj, System.IntPtr pd, out double min, out double max)
263 Eina.Log.Debug("function efl_ui_range_limits_get was called");
264 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
267 min = default(double); max = default(double);
270 ((ProgressbarPart)ws.Target).GetRangeLimits(out min, out max);
274 Eina.Log.Warning($"Callback error: {e.ToString()}");
275 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
282 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);
286 private static efl_ui_range_limits_get_delegate efl_ui_range_limits_get_static_delegate;
289 private delegate void efl_ui_range_limits_set_delegate(System.IntPtr obj, System.IntPtr pd, double min, double max);
292 public delegate void efl_ui_range_limits_set_api_delegate(System.IntPtr obj, double min, double max);
294 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");
296 private static void range_limits_set(System.IntPtr obj, System.IntPtr pd, double min, double max)
298 Eina.Log.Debug("function efl_ui_range_limits_set was called");
299 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
305 ((ProgressbarPart)ws.Target).SetRangeLimits(min, max);
309 Eina.Log.Warning($"Callback error: {e.ToString()}");
310 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
317 efl_ui_range_limits_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), min, max);
321 private static efl_ui_range_limits_set_delegate efl_ui_range_limits_set_static_delegate;
323 #pragma warning restore CA1707, CS1591, SA1300, SA1600