#pragma warning disable CS1591 using System; using System.Runtime.InteropServices; using System.Collections.Generic; using System.Linq; using System.ComponentModel; namespace Efl { namespace Ui { /// Interface that extends the normal displaying properties with usage properties. /// The properties defined here are used to manipulate the way a user interacts with a displayed range. [RangeInteractiveNativeInherit] public interface RangeInteractive : Efl.Ui.RangeDisplay , Efl.Eo.IWrapper, IDisposable { /// Control the step used to increment or decrement values for given widget. /// This value will be incremented or decremented to the displayed value. /// /// By default step value is equal to 1. /// /// Warning: The step value should be bigger than 0. /// The step value. double GetRangeStep(); /// Control the step used to increment or decrement values for given widget. /// This value will be incremented or decremented to the displayed value. /// /// By default step value is equal to 1. /// /// Warning: The step value should be bigger than 0. /// The step value. /// void SetRangeStep( double step); /// Control the step used to increment or decrement values for given widget. /// This value will be incremented or decremented to the displayed value. /// /// By default step value is equal to 1. /// /// Warning: The step value should be bigger than 0. /// The step value. double RangeStep { get ; set ; } } /// Interface that extends the normal displaying properties with usage properties. /// The properties defined here are used to manipulate the way a user interacts with a displayed range. sealed public class RangeInteractiveConcrete : RangeInteractive , Efl.Ui.RangeDisplay { ///Pointer to the native class description. public System.IntPtr NativeClass { get { if (((object)this).GetType() == typeof (RangeInteractiveConcrete)) return Efl.Ui.RangeInteractiveNativeInherit.GetEflClassStatic(); else return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()]; } } private System.IntPtr handle; ///Pointer to the native instance. public System.IntPtr NativeHandle { get { return handle; } } [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr efl_ui_range_interactive_interface_get(); ///Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly. public RangeInteractiveConcrete(System.IntPtr raw) { handle = raw; register_event_proxies(); } ///Destructor. ~RangeInteractiveConcrete() { Dispose(false); } ///Releases the underlying native instance. void Dispose(bool disposing) { if (handle != System.IntPtr.Zero) { Efl.Eo.Globals.efl_unref(handle); handle = System.IntPtr.Zero; } } ///Releases the underlying native instance. public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } ///Casts obj into an instance of this type. public static RangeInteractiveConcrete static_cast(Efl.Object obj) { if (obj == null) throw new System.ArgumentNullException("obj"); return new RangeInteractiveConcrete(obj.NativeHandle); } ///Verifies if the given object is equal to this one. public override bool Equals(object obj) { var other = obj as Efl.Object; if (other == null) return false; return this.NativeHandle == other.NativeHandle; } ///Gets the hash code for this object based on the native pointer it points to. public override int GetHashCode() { return this.NativeHandle.ToInt32(); } ///Turns the native pointer into a string representation. public override String ToString() { return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]"; } void register_event_proxies() { } /// Control the step used to increment or decrement values for given widget. /// This value will be incremented or decremented to the displayed value. /// /// By default step value is equal to 1. /// /// Warning: The step value should be bigger than 0. /// The step value. public double GetRangeStep() { var _ret_var = Efl.Ui.RangeInteractiveNativeInherit.efl_ui_range_step_get_ptr.Value.Delegate(this.NativeHandle); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// Control the step used to increment or decrement values for given widget. /// This value will be incremented or decremented to the displayed value. /// /// By default step value is equal to 1. /// /// Warning: The step value should be bigger than 0. /// The step value. /// public void SetRangeStep( double step) { Efl.Ui.RangeInteractiveNativeInherit.efl_ui_range_step_set_ptr.Value.Delegate(this.NativeHandle, step); Eina.Error.RaiseIfUnhandledException(); } /// Control the range value (in percentage) on a given range widget /// Use this call to set range levels. /// /// Note: If you pass a value out of the specified interval for val, it will be interpreted as the closest of the boundary values in the interval. /// The range value (must be between $0.0 and 1.0) public double GetRangeValue() { var _ret_var = Efl.Ui.RangeDisplayNativeInherit.efl_ui_range_value_get_ptr.Value.Delegate(this.NativeHandle); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// Control the range value (in percentage) on a given range widget /// Use this call to set range levels. /// /// Note: If you pass a value out of the specified interval for val, it will be interpreted as the closest of the boundary values in the interval. /// The range value (must be between $0.0 and 1.0) /// public void SetRangeValue( double val) { Efl.Ui.RangeDisplayNativeInherit.efl_ui_range_value_set_ptr.Value.Delegate(this.NativeHandle, val); Eina.Error.RaiseIfUnhandledException(); } /// Get the minimum and maximum values of the given range widget. /// Note: If only one value is needed, the other pointer can be passed as null. /// The minimum value. /// The maximum value. /// public void GetRangeMinMax( out double min, out double max) { Efl.Ui.RangeDisplayNativeInherit.efl_ui_range_min_max_get_ptr.Value.Delegate(this.NativeHandle, out min, out max); Eina.Error.RaiseIfUnhandledException(); } /// Set the minimum and maximum values for given range widget. /// Define the allowed range of values to be selected by the user. /// /// If actual value is less than min, it will be updated to min. If it is bigger then max, will be updated to max. The actual value can be obtained with /// /// The minimum and maximum values may be different for each class. /// /// Warning: maximum must be greater than minimum, otherwise behavior is undefined. /// The minimum value. /// The maximum value. /// public void SetRangeMinMax( double min, double max) { Efl.Ui.RangeDisplayNativeInherit.efl_ui_range_min_max_set_ptr.Value.Delegate(this.NativeHandle, min, max); Eina.Error.RaiseIfUnhandledException(); } /// Control the step used to increment or decrement values for given widget. /// This value will be incremented or decremented to the displayed value. /// /// By default step value is equal to 1. /// /// Warning: The step value should be bigger than 0. /// The step value. public double RangeStep { get { return GetRangeStep(); } set { SetRangeStep( value); } } /// Control the range value (in percentage) on a given range widget /// Use this call to set range levels. /// /// Note: If you pass a value out of the specified interval for val, it will be interpreted as the closest of the boundary values in the interval. /// The range value (must be between $0.0 and 1.0) public double RangeValue { get { return GetRangeValue(); } set { SetRangeValue( value); } } } public class RangeInteractiveNativeInherit : Efl.Eo.NativeClass{ public static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Efl); public override System.Collections.Generic.List GetEoOps(System.Type type) { var descs = new System.Collections.Generic.List(); if (efl_ui_range_step_get_static_delegate == null) efl_ui_range_step_get_static_delegate = new efl_ui_range_step_get_delegate(range_step_get); 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)}); if (efl_ui_range_step_set_static_delegate == null) efl_ui_range_step_set_static_delegate = new efl_ui_range_step_set_delegate(range_step_set); 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)}); if (efl_ui_range_value_get_static_delegate == null) efl_ui_range_value_get_static_delegate = new efl_ui_range_value_get_delegate(range_value_get); 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)}); if (efl_ui_range_value_set_static_delegate == null) efl_ui_range_value_set_static_delegate = new efl_ui_range_value_set_delegate(range_value_set); 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)}); if (efl_ui_range_min_max_get_static_delegate == null) efl_ui_range_min_max_get_static_delegate = new efl_ui_range_min_max_get_delegate(range_min_max_get); 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)}); if (efl_ui_range_min_max_set_static_delegate == null) efl_ui_range_min_max_set_static_delegate = new efl_ui_range_min_max_set_delegate(range_min_max_set); 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)}); return descs; } public override IntPtr GetEflClass() { return Efl.Ui.RangeInteractiveConcrete.efl_ui_range_interactive_interface_get(); } public static IntPtr GetEflClassStatic() { return Efl.Ui.RangeInteractiveConcrete.efl_ui_range_interactive_interface_get(); } private delegate double efl_ui_range_step_get_delegate(System.IntPtr obj, System.IntPtr pd); public delegate double efl_ui_range_step_get_api_delegate(System.IntPtr obj); public static Efl.Eo.FunctionWrapper efl_ui_range_step_get_ptr = new Efl.Eo.FunctionWrapper(_Module, "efl_ui_range_step_get"); private static double range_step_get(System.IntPtr obj, System.IntPtr pd) { Eina.Log.Debug("function efl_ui_range_step_get was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd); if(wrapper != null) { double _ret_var = default(double); try { _ret_var = ((RangeInteractive)wrapper).GetRangeStep(); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return _ret_var; } else { return efl_ui_range_step_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj))); } } private static efl_ui_range_step_get_delegate efl_ui_range_step_get_static_delegate; private delegate void efl_ui_range_step_set_delegate(System.IntPtr obj, System.IntPtr pd, double step); public delegate void efl_ui_range_step_set_api_delegate(System.IntPtr obj, double step); public static Efl.Eo.FunctionWrapper efl_ui_range_step_set_ptr = new Efl.Eo.FunctionWrapper(_Module, "efl_ui_range_step_set"); private static void range_step_set(System.IntPtr obj, System.IntPtr pd, double step) { Eina.Log.Debug("function efl_ui_range_step_set was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd); if(wrapper != null) { try { ((RangeInteractive)wrapper).SetRangeStep( step); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } else { efl_ui_range_step_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), step); } } private static efl_ui_range_step_set_delegate efl_ui_range_step_set_static_delegate; private delegate double efl_ui_range_value_get_delegate(System.IntPtr obj, System.IntPtr pd); public delegate double efl_ui_range_value_get_api_delegate(System.IntPtr obj); public static Efl.Eo.FunctionWrapper efl_ui_range_value_get_ptr = new Efl.Eo.FunctionWrapper(_Module, "efl_ui_range_value_get"); private static double range_value_get(System.IntPtr obj, System.IntPtr pd) { Eina.Log.Debug("function efl_ui_range_value_get was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd); if(wrapper != null) { double _ret_var = default(double); try { _ret_var = ((RangeInteractive)wrapper).GetRangeValue(); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return _ret_var; } else { return efl_ui_range_value_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj))); } } private static efl_ui_range_value_get_delegate efl_ui_range_value_get_static_delegate; private delegate void efl_ui_range_value_set_delegate(System.IntPtr obj, System.IntPtr pd, double val); public delegate void efl_ui_range_value_set_api_delegate(System.IntPtr obj, double val); public static Efl.Eo.FunctionWrapper efl_ui_range_value_set_ptr = new Efl.Eo.FunctionWrapper(_Module, "efl_ui_range_value_set"); private static void range_value_set(System.IntPtr obj, System.IntPtr pd, double val) { Eina.Log.Debug("function efl_ui_range_value_set was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd); if(wrapper != null) { try { ((RangeInteractive)wrapper).SetRangeValue( val); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } else { efl_ui_range_value_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), val); } } private static efl_ui_range_value_set_delegate efl_ui_range_value_set_static_delegate; private delegate void efl_ui_range_min_max_get_delegate(System.IntPtr obj, System.IntPtr pd, out double min, out double max); public delegate void efl_ui_range_min_max_get_api_delegate(System.IntPtr obj, out double min, out double max); public static Efl.Eo.FunctionWrapper efl_ui_range_min_max_get_ptr = new Efl.Eo.FunctionWrapper(_Module, "efl_ui_range_min_max_get"); private static void range_min_max_get(System.IntPtr obj, System.IntPtr pd, out double min, out double max) { Eina.Log.Debug("function efl_ui_range_min_max_get was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd); if(wrapper != null) { min = default(double); max = default(double); try { ((RangeInteractive)wrapper).GetRangeMinMax( out min, out max); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } else { 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); } } private static efl_ui_range_min_max_get_delegate efl_ui_range_min_max_get_static_delegate; private delegate void efl_ui_range_min_max_set_delegate(System.IntPtr obj, System.IntPtr pd, double min, double max); public delegate void efl_ui_range_min_max_set_api_delegate(System.IntPtr obj, double min, double max); public static Efl.Eo.FunctionWrapper efl_ui_range_min_max_set_ptr = new Efl.Eo.FunctionWrapper(_Module, "efl_ui_range_min_max_set"); private static void range_min_max_set(System.IntPtr obj, System.IntPtr pd, double min, double max) { Eina.Log.Debug("function efl_ui_range_min_max_set was called"); Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd); if(wrapper != null) { try { ((RangeInteractive)wrapper).SetRangeMinMax( min, max); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } else { efl_ui_range_min_max_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), min, max); } } private static efl_ui_range_min_max_set_delegate efl_ui_range_min_max_set_static_delegate; } } }