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>Interface that extends the normal displaying properties with usage properties.
13 /// The properties defined here are used to manipulate the way a user interacts with a displayed range.</summary>
14 [Efl.Ui.IRangeInteractiveConcrete.NativeMethods]
15 public interface IRangeInteractive :
16 Efl.Ui.IRangeDisplay ,
17 Efl.Eo.IWrapper, IDisposable
19 /// <summary>Control the step used to increment or decrement values for given widget.
20 /// This value will be incremented or decremented to the displayed value.
22 /// By default step value is equal to 1.
24 /// Warning: The step value should be bigger than 0.</summary>
25 /// <returns>The step value.</returns>
26 double GetRangeStep();
27 /// <summary>Control the step used to increment or decrement values for given widget.
28 /// This value will be incremented or decremented to the displayed value.
30 /// By default step value is equal to 1.
32 /// Warning: The step value should be bigger than 0.</summary>
33 /// <param name="step">The step value.</param>
34 void SetRangeStep(double step);
35 /// <summary>Control the step used to increment or decrement values for given widget.
36 /// This value will be incremented or decremented to the displayed value.
38 /// By default step value is equal to 1.
40 /// Warning: The step value should be bigger than 0.</summary>
41 /// <value>The step value.</value>
47 /// <summary>Interface that extends the normal displaying properties with usage properties.
48 /// The properties defined here are used to manipulate the way a user interacts with a displayed range.</summary>
49 sealed public class IRangeInteractiveConcrete :
52 , Efl.Ui.IRangeDisplay
54 ///<summary>Pointer to the native class description.</summary>
55 public override System.IntPtr NativeClass
59 if (((object)this).GetType() == typeof(IRangeInteractiveConcrete))
61 return GetEflClassStatic();
65 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
70 [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
71 efl_ui_range_interactive_interface_get();
72 /// <summary>Initializes a new instance of the <see cref="IRangeInteractive"/> class.
73 /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
74 private IRangeInteractiveConcrete(System.IntPtr raw) : base(raw)
78 /// <summary>Control the step used to increment or decrement values for given widget.
79 /// This value will be incremented or decremented to the displayed value.
81 /// By default step value is equal to 1.
83 /// Warning: The step value should be bigger than 0.</summary>
84 /// <returns>The step value.</returns>
85 public double GetRangeStep() {
86 var _ret_var = Efl.Ui.IRangeInteractiveConcrete.NativeMethods.efl_ui_range_step_get_ptr.Value.Delegate(this.NativeHandle);
87 Eina.Error.RaiseIfUnhandledException();
90 /// <summary>Control the step used to increment or decrement values for given widget.
91 /// This value will be incremented or decremented to the displayed value.
93 /// By default step value is equal to 1.
95 /// Warning: The step value should be bigger than 0.</summary>
96 /// <param name="step">The step value.</param>
97 public void SetRangeStep(double step) {
98 Efl.Ui.IRangeInteractiveConcrete.NativeMethods.efl_ui_range_step_set_ptr.Value.Delegate(this.NativeHandle,step);
99 Eina.Error.RaiseIfUnhandledException();
101 /// <summary>Control the range value (in percentage) on a given range widget
102 /// Use this call to set range levels.
104 /// 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>
105 /// <returns>The range value (must be between $0.0 and 1.0)</returns>
106 public double GetRangeValue() {
107 var _ret_var = Efl.Ui.IRangeDisplayConcrete.NativeMethods.efl_ui_range_value_get_ptr.Value.Delegate(this.NativeHandle);
108 Eina.Error.RaiseIfUnhandledException();
111 /// <summary>Control the range value (in percentage) on a given range widget
112 /// Use this call to set range levels.
114 /// 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>
115 /// <param name="val">The range value (must be between $0.0 and 1.0)</param>
116 public void SetRangeValue(double val) {
117 Efl.Ui.IRangeDisplayConcrete.NativeMethods.efl_ui_range_value_set_ptr.Value.Delegate(this.NativeHandle,val);
118 Eina.Error.RaiseIfUnhandledException();
120 /// <summary>Get the minimum and maximum values of the given range widget.
121 /// Note: If only one value is needed, the other pointer can be passed as <c>null</c>.</summary>
122 /// <param name="min">The minimum value.</param>
123 /// <param name="max">The maximum value.</param>
124 public void GetRangeMinMax(out double min, out double max) {
125 Efl.Ui.IRangeDisplayConcrete.NativeMethods.efl_ui_range_min_max_get_ptr.Value.Delegate(this.NativeHandle,out min, out max);
126 Eina.Error.RaiseIfUnhandledException();
128 /// <summary>Set the minimum and maximum values for given range widget.
129 /// Define the allowed range of values to be selected by the user.
131 /// 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"/>
133 /// The minimum and maximum values may be different for each class.
135 /// Warning: maximum must be greater than minimum, otherwise behavior is undefined.</summary>
136 /// <param name="min">The minimum value.</param>
137 /// <param name="max">The maximum value.</param>
138 public void SetRangeMinMax(double min, double max) {
139 Efl.Ui.IRangeDisplayConcrete.NativeMethods.efl_ui_range_min_max_set_ptr.Value.Delegate(this.NativeHandle,min, max);
140 Eina.Error.RaiseIfUnhandledException();
142 /// <summary>Control the step used to increment or decrement values for given widget.
143 /// This value will be incremented or decremented to the displayed value.
145 /// By default step value is equal to 1.
147 /// Warning: The step value should be bigger than 0.</summary>
148 /// <value>The step value.</value>
149 public double RangeStep {
150 get { return GetRangeStep(); }
151 set { SetRangeStep(value); }
153 /// <summary>Control the range value (in percentage) on a given range widget
154 /// Use this call to set range levels.
156 /// 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>
157 /// <value>The range value (must be between $0.0 and 1.0)</value>
158 public double RangeValue {
159 get { return GetRangeValue(); }
160 set { SetRangeValue(value); }
162 private static IntPtr GetEflClassStatic()
164 return Efl.Ui.IRangeInteractiveConcrete.efl_ui_range_interactive_interface_get();
166 /// <summary>Wrapper for native methods and virtual method delegates.
167 /// For internal use by generated code only.</summary>
168 public class NativeMethods : Efl.Eo.NativeClass
170 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Efl);
171 /// <summary>Gets the list of Eo operations to override.</summary>
172 /// <returns>The list of Eo operations to be overload.</returns>
173 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
175 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
176 var methods = Efl.Eo.Globals.GetUserMethods(type);
178 if (efl_ui_range_step_get_static_delegate == null)
180 efl_ui_range_step_get_static_delegate = new efl_ui_range_step_get_delegate(range_step_get);
183 if (methods.FirstOrDefault(m => m.Name == "GetRangeStep") != null)
185 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_range_step_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_range_step_get_static_delegate) });
188 if (efl_ui_range_step_set_static_delegate == null)
190 efl_ui_range_step_set_static_delegate = new efl_ui_range_step_set_delegate(range_step_set);
193 if (methods.FirstOrDefault(m => m.Name == "SetRangeStep") != null)
195 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_range_step_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_range_step_set_static_delegate) });
198 if (efl_ui_range_value_get_static_delegate == null)
200 efl_ui_range_value_get_static_delegate = new efl_ui_range_value_get_delegate(range_value_get);
203 if (methods.FirstOrDefault(m => m.Name == "GetRangeValue") != null)
205 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) });
208 if (efl_ui_range_value_set_static_delegate == null)
210 efl_ui_range_value_set_static_delegate = new efl_ui_range_value_set_delegate(range_value_set);
213 if (methods.FirstOrDefault(m => m.Name == "SetRangeValue") != null)
215 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) });
218 if (efl_ui_range_min_max_get_static_delegate == null)
220 efl_ui_range_min_max_get_static_delegate = new efl_ui_range_min_max_get_delegate(range_min_max_get);
223 if (methods.FirstOrDefault(m => m.Name == "GetRangeMinMax") != null)
225 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_range_min_max_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_range_min_max_get_static_delegate) });
228 if (efl_ui_range_min_max_set_static_delegate == null)
230 efl_ui_range_min_max_set_static_delegate = new efl_ui_range_min_max_set_delegate(range_min_max_set);
233 if (methods.FirstOrDefault(m => m.Name == "SetRangeMinMax") != null)
235 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_range_min_max_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_range_min_max_set_static_delegate) });
240 /// <summary>Returns the Eo class for the native methods of this class.</summary>
241 /// <returns>The native class pointer.</returns>
242 public override IntPtr GetEflClass()
244 return Efl.Ui.IRangeInteractiveConcrete.efl_ui_range_interactive_interface_get();
247 #pragma warning disable CA1707, CS1591, SA1300, SA1600
250 private delegate double efl_ui_range_step_get_delegate(System.IntPtr obj, System.IntPtr pd);
253 public delegate double efl_ui_range_step_get_api_delegate(System.IntPtr obj);
255 public static Efl.Eo.FunctionWrapper<efl_ui_range_step_get_api_delegate> efl_ui_range_step_get_ptr = new Efl.Eo.FunctionWrapper<efl_ui_range_step_get_api_delegate>(Module, "efl_ui_range_step_get");
257 private static double range_step_get(System.IntPtr obj, System.IntPtr pd)
259 Eina.Log.Debug("function efl_ui_range_step_get was called");
260 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
263 double _ret_var = default(double);
266 _ret_var = ((IRangeInteractive)ws.Target).GetRangeStep();
270 Eina.Log.Warning($"Callback error: {e.ToString()}");
271 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
279 return efl_ui_range_step_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
283 private static efl_ui_range_step_get_delegate efl_ui_range_step_get_static_delegate;
286 private delegate void efl_ui_range_step_set_delegate(System.IntPtr obj, System.IntPtr pd, double step);
289 public delegate void efl_ui_range_step_set_api_delegate(System.IntPtr obj, double step);
291 public static Efl.Eo.FunctionWrapper<efl_ui_range_step_set_api_delegate> efl_ui_range_step_set_ptr = new Efl.Eo.FunctionWrapper<efl_ui_range_step_set_api_delegate>(Module, "efl_ui_range_step_set");
293 private static void range_step_set(System.IntPtr obj, System.IntPtr pd, double step)
295 Eina.Log.Debug("function efl_ui_range_step_set was called");
296 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
302 ((IRangeInteractive)ws.Target).SetRangeStep(step);
306 Eina.Log.Warning($"Callback error: {e.ToString()}");
307 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
314 efl_ui_range_step_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), step);
318 private static efl_ui_range_step_set_delegate efl_ui_range_step_set_static_delegate;
321 private delegate double efl_ui_range_value_get_delegate(System.IntPtr obj, System.IntPtr pd);
324 public delegate double efl_ui_range_value_get_api_delegate(System.IntPtr obj);
326 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");
328 private static double range_value_get(System.IntPtr obj, System.IntPtr pd)
330 Eina.Log.Debug("function efl_ui_range_value_get was called");
331 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
334 double _ret_var = default(double);
337 _ret_var = ((IRangeInteractive)ws.Target).GetRangeValue();
341 Eina.Log.Warning($"Callback error: {e.ToString()}");
342 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
350 return efl_ui_range_value_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
354 private static efl_ui_range_value_get_delegate efl_ui_range_value_get_static_delegate;
357 private delegate void efl_ui_range_value_set_delegate(System.IntPtr obj, System.IntPtr pd, double val);
360 public delegate void efl_ui_range_value_set_api_delegate(System.IntPtr obj, double val);
362 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");
364 private static void range_value_set(System.IntPtr obj, System.IntPtr pd, double val)
366 Eina.Log.Debug("function efl_ui_range_value_set was called");
367 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
373 ((IRangeInteractive)ws.Target).SetRangeValue(val);
377 Eina.Log.Warning($"Callback error: {e.ToString()}");
378 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
385 efl_ui_range_value_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), val);
389 private static efl_ui_range_value_set_delegate efl_ui_range_value_set_static_delegate;
392 private delegate void efl_ui_range_min_max_get_delegate(System.IntPtr obj, System.IntPtr pd, out double min, out double max);
395 public delegate void efl_ui_range_min_max_get_api_delegate(System.IntPtr obj, out double min, out double max);
397 public static Efl.Eo.FunctionWrapper<efl_ui_range_min_max_get_api_delegate> efl_ui_range_min_max_get_ptr = new Efl.Eo.FunctionWrapper<efl_ui_range_min_max_get_api_delegate>(Module, "efl_ui_range_min_max_get");
399 private static void range_min_max_get(System.IntPtr obj, System.IntPtr pd, out double min, out double max)
401 Eina.Log.Debug("function efl_ui_range_min_max_get was called");
402 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
405 min = default(double); max = default(double);
408 ((IRangeInteractive)ws.Target).GetRangeMinMax(out min, out max);
412 Eina.Log.Warning($"Callback error: {e.ToString()}");
413 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
420 efl_ui_range_min_max_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out min, out max);
424 private static efl_ui_range_min_max_get_delegate efl_ui_range_min_max_get_static_delegate;
427 private delegate void efl_ui_range_min_max_set_delegate(System.IntPtr obj, System.IntPtr pd, double min, double max);
430 public delegate void efl_ui_range_min_max_set_api_delegate(System.IntPtr obj, double min, double max);
432 public static Efl.Eo.FunctionWrapper<efl_ui_range_min_max_set_api_delegate> efl_ui_range_min_max_set_ptr = new Efl.Eo.FunctionWrapper<efl_ui_range_min_max_set_api_delegate>(Module, "efl_ui_range_min_max_set");
434 private static void range_min_max_set(System.IntPtr obj, System.IntPtr pd, double min, double max)
436 Eina.Log.Debug("function efl_ui_range_min_max_set was called");
437 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
443 ((IRangeInteractive)ws.Target).SetRangeMinMax(min, max);
447 Eina.Log.Warning($"Callback error: {e.ToString()}");
448 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
455 efl_ui_range_min_max_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), min, max);
459 private static efl_ui_range_min_max_set_delegate efl_ui_range_min_max_set_static_delegate;
461 #pragma warning restore CA1707, CS1591, SA1300, SA1600