1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.ComponentModel;
7 namespace Efl { namespace Ui {
8 /// <summary>Interface that extends the normal displaying properties with usage properties.
9 /// The properties defined here are used to manipulate the way a user interacts with a displayed range.</summary>
10 [RangeInteractiveNativeInherit]
11 public interface RangeInteractive :
13 Efl.Eo.IWrapper, IDisposable
15 /// <summary>Control the step used to increment or decrement values for given widget.
16 /// This value will be incremented or decremented to the displayed value.
18 /// By default step value is equal to 1.
20 /// Warning: The step value should be bigger than 0.</summary>
21 /// <returns>The step value.</returns>
22 double GetRangeStep();
23 /// <summary>Control the step used to increment or decrement values for given widget.
24 /// This value will be incremented or decremented to the displayed value.
26 /// By default step value is equal to 1.
28 /// Warning: The step value should be bigger than 0.</summary>
29 /// <param name="step">The step value.</param>
30 /// <returns></returns>
31 void SetRangeStep( double step);
32 /// <summary>Control the step used to increment or decrement values for given widget.
33 /// This value will be incremented or decremented to the displayed value.
35 /// By default step value is equal to 1.
37 /// Warning: The step value should be bigger than 0.</summary>
38 /// <value>The step value.</value>
44 /// <summary>Interface that extends the normal displaying properties with usage properties.
45 /// The properties defined here are used to manipulate the way a user interacts with a displayed range.</summary>
46 sealed public class RangeInteractiveConcrete :
51 ///<summary>Pointer to the native class description.</summary>
52 public System.IntPtr NativeClass {
54 if (((object)this).GetType() == typeof (RangeInteractiveConcrete))
55 return Efl.Ui.RangeInteractiveNativeInherit.GetEflClassStatic();
57 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
60 private System.IntPtr handle;
61 ///<summary>Pointer to the native instance.</summary>
62 public System.IntPtr NativeHandle {
63 get { return handle; }
65 [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
66 efl_ui_range_interactive_interface_get();
67 ///<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>
68 public RangeInteractiveConcrete(System.IntPtr raw)
71 register_event_proxies();
73 ///<summary>Destructor.</summary>
74 ~RangeInteractiveConcrete()
78 ///<summary>Releases the underlying native instance.</summary>
79 void Dispose(bool disposing)
81 if (handle != System.IntPtr.Zero) {
82 Efl.Eo.Globals.efl_unref(handle);
83 handle = System.IntPtr.Zero;
86 ///<summary>Releases the underlying native instance.</summary>
90 GC.SuppressFinalize(this);
92 ///<summary>Casts obj into an instance of this type.</summary>
93 public static RangeInteractiveConcrete static_cast(Efl.Object obj)
96 throw new System.ArgumentNullException("obj");
97 return new RangeInteractiveConcrete(obj.NativeHandle);
99 ///<summary>Verifies if the given object is equal to this one.</summary>
100 public override bool Equals(object obj)
102 var other = obj as Efl.Object;
105 return this.NativeHandle == other.NativeHandle;
107 ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
108 public override int GetHashCode()
110 return this.NativeHandle.ToInt32();
112 ///<summary>Turns the native pointer into a string representation.</summary>
113 public override String ToString()
115 return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
117 void register_event_proxies()
120 /// <summary>Control the step used to increment or decrement values for given widget.
121 /// This value will be incremented or decremented to the displayed value.
123 /// By default step value is equal to 1.
125 /// Warning: The step value should be bigger than 0.</summary>
126 /// <returns>The step value.</returns>
127 public double GetRangeStep() {
128 var _ret_var = Efl.Ui.RangeInteractiveNativeInherit.efl_ui_range_step_get_ptr.Value.Delegate(this.NativeHandle);
129 Eina.Error.RaiseIfUnhandledException();
132 /// <summary>Control the step used to increment or decrement values for given widget.
133 /// This value will be incremented or decremented to the displayed value.
135 /// By default step value is equal to 1.
137 /// Warning: The step value should be bigger than 0.</summary>
138 /// <param name="step">The step value.</param>
139 /// <returns></returns>
140 public void SetRangeStep( double step) {
141 Efl.Ui.RangeInteractiveNativeInherit.efl_ui_range_step_set_ptr.Value.Delegate(this.NativeHandle, step);
142 Eina.Error.RaiseIfUnhandledException();
144 /// <summary>Control the range value (in percentage) on a given range widget
145 /// Use this call to set range levels.
147 /// 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>
148 /// <returns>The range value (must be between $0.0 and 1.0)</returns>
149 public double GetRangeValue() {
150 var _ret_var = Efl.Ui.RangeDisplayNativeInherit.efl_ui_range_value_get_ptr.Value.Delegate(this.NativeHandle);
151 Eina.Error.RaiseIfUnhandledException();
154 /// <summary>Control the range value (in percentage) on a given range widget
155 /// Use this call to set range levels.
157 /// 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>
158 /// <param name="val">The range value (must be between $0.0 and 1.0)</param>
159 /// <returns></returns>
160 public void SetRangeValue( double val) {
161 Efl.Ui.RangeDisplayNativeInherit.efl_ui_range_value_set_ptr.Value.Delegate(this.NativeHandle, val);
162 Eina.Error.RaiseIfUnhandledException();
164 /// <summary>Get the minimum and maximum values of the given range widget.
165 /// Note: If only one value is needed, the other pointer can be passed as <c>null</c>.</summary>
166 /// <param name="min">The minimum value.</param>
167 /// <param name="max">The maximum value.</param>
168 /// <returns></returns>
169 public void GetRangeMinMax( out double min, out double max) {
170 Efl.Ui.RangeDisplayNativeInherit.efl_ui_range_min_max_get_ptr.Value.Delegate(this.NativeHandle, out min, out max);
171 Eina.Error.RaiseIfUnhandledException();
173 /// <summary>Set the minimum and maximum values for given range widget.
174 /// Define the allowed range of values to be selected by the user.
176 /// 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.RangeDisplay.GetRangeValue"/>
178 /// The minimum and maximum values may be different for each class.
180 /// Warning: maximum must be greater than minimum, otherwise behavior is undefined.</summary>
181 /// <param name="min">The minimum value.</param>
182 /// <param name="max">The maximum value.</param>
183 /// <returns></returns>
184 public void SetRangeMinMax( double min, double max) {
185 Efl.Ui.RangeDisplayNativeInherit.efl_ui_range_min_max_set_ptr.Value.Delegate(this.NativeHandle, min, max);
186 Eina.Error.RaiseIfUnhandledException();
188 /// <summary>Control the step used to increment or decrement values for given widget.
189 /// This value will be incremented or decremented to the displayed value.
191 /// By default step value is equal to 1.
193 /// Warning: The step value should be bigger than 0.</summary>
194 /// <value>The step value.</value>
195 public double RangeStep {
196 get { return GetRangeStep(); }
197 set { SetRangeStep( value); }
199 /// <summary>Control the range value (in percentage) on a given range widget
200 /// Use this call to set range levels.
202 /// 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>
203 /// <value>The range value (must be between $0.0 and 1.0)</value>
204 public double RangeValue {
205 get { return GetRangeValue(); }
206 set { SetRangeValue( value); }
209 public class RangeInteractiveNativeInherit : Efl.Eo.NativeClass{
210 public static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Efl);
211 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
213 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
214 if (efl_ui_range_step_get_static_delegate == null)
215 efl_ui_range_step_get_static_delegate = new efl_ui_range_step_get_delegate(range_step_get);
216 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)});
217 if (efl_ui_range_step_set_static_delegate == null)
218 efl_ui_range_step_set_static_delegate = new efl_ui_range_step_set_delegate(range_step_set);
219 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)});
220 if (efl_ui_range_value_get_static_delegate == null)
221 efl_ui_range_value_get_static_delegate = new efl_ui_range_value_get_delegate(range_value_get);
222 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)});
223 if (efl_ui_range_value_set_static_delegate == null)
224 efl_ui_range_value_set_static_delegate = new efl_ui_range_value_set_delegate(range_value_set);
225 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)});
226 if (efl_ui_range_min_max_get_static_delegate == null)
227 efl_ui_range_min_max_get_static_delegate = new efl_ui_range_min_max_get_delegate(range_min_max_get);
228 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)});
229 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);
231 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)});
234 public override IntPtr GetEflClass()
236 return Efl.Ui.RangeInteractiveConcrete.efl_ui_range_interactive_interface_get();
238 public static IntPtr GetEflClassStatic()
240 return Efl.Ui.RangeInteractiveConcrete.efl_ui_range_interactive_interface_get();
244 private delegate double efl_ui_range_step_get_delegate(System.IntPtr obj, System.IntPtr pd);
247 public delegate double efl_ui_range_step_get_api_delegate(System.IntPtr obj);
248 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");
249 private static double range_step_get(System.IntPtr obj, System.IntPtr pd)
251 Eina.Log.Debug("function efl_ui_range_step_get was called");
252 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
253 if(wrapper != null) {
254 double _ret_var = default(double);
256 _ret_var = ((RangeInteractive)wrapper).GetRangeStep();
257 } catch (Exception e) {
258 Eina.Log.Warning($"Callback error: {e.ToString()}");
259 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
263 return efl_ui_range_step_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
266 private static efl_ui_range_step_get_delegate efl_ui_range_step_get_static_delegate;
269 private delegate void efl_ui_range_step_set_delegate(System.IntPtr obj, System.IntPtr pd, double step);
272 public delegate void efl_ui_range_step_set_api_delegate(System.IntPtr obj, double step);
273 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");
274 private static void range_step_set(System.IntPtr obj, System.IntPtr pd, double step)
276 Eina.Log.Debug("function efl_ui_range_step_set was called");
277 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
278 if(wrapper != null) {
281 ((RangeInteractive)wrapper).SetRangeStep( step);
282 } catch (Exception e) {
283 Eina.Log.Warning($"Callback error: {e.ToString()}");
284 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
287 efl_ui_range_step_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), step);
290 private static efl_ui_range_step_set_delegate efl_ui_range_step_set_static_delegate;
293 private delegate double efl_ui_range_value_get_delegate(System.IntPtr obj, System.IntPtr pd);
296 public delegate double efl_ui_range_value_get_api_delegate(System.IntPtr obj);
297 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");
298 private static double range_value_get(System.IntPtr obj, System.IntPtr pd)
300 Eina.Log.Debug("function efl_ui_range_value_get was called");
301 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
302 if(wrapper != null) {
303 double _ret_var = default(double);
305 _ret_var = ((RangeInteractive)wrapper).GetRangeValue();
306 } catch (Exception e) {
307 Eina.Log.Warning($"Callback error: {e.ToString()}");
308 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
312 return efl_ui_range_value_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
315 private static efl_ui_range_value_get_delegate efl_ui_range_value_get_static_delegate;
318 private delegate void efl_ui_range_value_set_delegate(System.IntPtr obj, System.IntPtr pd, double val);
321 public delegate void efl_ui_range_value_set_api_delegate(System.IntPtr obj, double val);
322 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");
323 private static void range_value_set(System.IntPtr obj, System.IntPtr pd, double val)
325 Eina.Log.Debug("function efl_ui_range_value_set was called");
326 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
327 if(wrapper != null) {
330 ((RangeInteractive)wrapper).SetRangeValue( val);
331 } catch (Exception e) {
332 Eina.Log.Warning($"Callback error: {e.ToString()}");
333 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
336 efl_ui_range_value_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), val);
339 private static efl_ui_range_value_set_delegate efl_ui_range_value_set_static_delegate;
342 private delegate void efl_ui_range_min_max_get_delegate(System.IntPtr obj, System.IntPtr pd, out double min, out double max);
345 public delegate void efl_ui_range_min_max_get_api_delegate(System.IntPtr obj, out double min, out double max);
346 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");
347 private static void range_min_max_get(System.IntPtr obj, System.IntPtr pd, out double min, out double max)
349 Eina.Log.Debug("function efl_ui_range_min_max_get was called");
350 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
351 if(wrapper != null) {
352 min = default(double); max = default(double);
354 ((RangeInteractive)wrapper).GetRangeMinMax( out min, out max);
355 } catch (Exception e) {
356 Eina.Log.Warning($"Callback error: {e.ToString()}");
357 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
360 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);
363 private static efl_ui_range_min_max_get_delegate efl_ui_range_min_max_get_static_delegate;
366 private delegate void efl_ui_range_min_max_set_delegate(System.IntPtr obj, System.IntPtr pd, double min, double max);
369 public delegate void efl_ui_range_min_max_set_api_delegate(System.IntPtr obj, double min, double max);
370 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");
371 private static void range_min_max_set(System.IntPtr obj, System.IntPtr pd, double min, double max)
373 Eina.Log.Debug("function efl_ui_range_min_max_set was called");
374 Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
375 if(wrapper != null) {
378 ((RangeInteractive)wrapper).SetRangeMinMax( min, max);
379 } catch (Exception e) {
380 Eina.Log.Warning($"Callback error: {e.ToString()}");
381 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
384 efl_ui_range_min_max_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), min, max);
387 private static efl_ui_range_min_max_set_delegate efl_ui_range_min_max_set_static_delegate;