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>An interval slider.
13 /// This is a slider with two indicators.</summary>
14 [Efl.Ui.SliderInterval.NativeMethods]
15 [Efl.Eo.BindingEntity]
16 public class SliderInterval : Efl.Ui.Slider
18 ///<summary>Pointer to the native class description.</summary>
19 public override System.IntPtr NativeClass
23 if (((object)this).GetType() == typeof(SliderInterval))
25 return GetEflClassStatic();
29 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
34 [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
35 efl_ui_slider_interval_class_get();
36 /// <summary>Initializes a new instance of the <see cref="SliderInterval"/> class.</summary>
37 /// <param name="parent">Parent instance.</param>
38 /// <param name="style">The widget style to use. See <see cref="Efl.Ui.Widget.SetStyle" /></param>
39 public SliderInterval(Efl.Object parent
40 , System.String style = null) : base(efl_ui_slider_interval_class_get(), parent)
42 if (Efl.Eo.Globals.ParamHelperCheck(style))
44 SetStyle(Efl.Eo.Globals.GetParamHelper(style));
47 FinishInstantiation();
50 /// <summary>Constructor to be used when objects are expected to be constructed from native code.</summary>
51 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
52 protected SliderInterval(ConstructingHandle ch) : base(ch)
56 /// <summary>Initializes a new instance of the <see cref="SliderInterval"/> class.
57 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
58 /// <param name="wh">The native pointer to be wrapped.</param>
59 protected SliderInterval(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
63 /// <summary>Initializes a new instance of the <see cref="SliderInterval"/> class.
64 /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
65 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
66 /// <param name="parent">The Efl.Object parent of this instance.</param>
67 protected SliderInterval(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent)
71 /// <summary>Sets up position of two indicators at start and end position.</summary>
72 /// <param name="from">interval minimum value</param>
73 /// <param name="to">interval maximum value</param>
74 virtual public void GetIntervalValue(out double from, out double to) {
75 Efl.Ui.SliderInterval.NativeMethods.efl_ui_slider_interval_value_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),out from, out to);
76 Eina.Error.RaiseIfUnhandledException();
78 /// <summary>Sets up position of two indicators at start and end position.</summary>
79 /// <param name="from">interval minimum value</param>
80 /// <param name="to">interval maximum value</param>
81 virtual public void SetIntervalValue(double from, double to) {
82 Efl.Ui.SliderInterval.NativeMethods.efl_ui_slider_interval_value_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),from, to);
83 Eina.Error.RaiseIfUnhandledException();
85 private static IntPtr GetEflClassStatic()
87 return Efl.Ui.SliderInterval.efl_ui_slider_interval_class_get();
89 /// <summary>Wrapper for native methods and virtual method delegates.
90 /// For internal use by generated code only.</summary>
91 public new class NativeMethods : Efl.Ui.Slider.NativeMethods
93 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Elementary);
94 /// <summary>Gets the list of Eo operations to override.</summary>
95 /// <returns>The list of Eo operations to be overload.</returns>
96 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
98 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
99 var methods = Efl.Eo.Globals.GetUserMethods(type);
101 if (efl_ui_slider_interval_value_get_static_delegate == null)
103 efl_ui_slider_interval_value_get_static_delegate = new efl_ui_slider_interval_value_get_delegate(interval_value_get);
106 if (methods.FirstOrDefault(m => m.Name == "GetIntervalValue") != null)
108 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_slider_interval_value_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_slider_interval_value_get_static_delegate) });
111 if (efl_ui_slider_interval_value_set_static_delegate == null)
113 efl_ui_slider_interval_value_set_static_delegate = new efl_ui_slider_interval_value_set_delegate(interval_value_set);
116 if (methods.FirstOrDefault(m => m.Name == "SetIntervalValue") != null)
118 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_slider_interval_value_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_slider_interval_value_set_static_delegate) });
121 descs.AddRange(base.GetEoOps(type));
124 /// <summary>Returns the Eo class for the native methods of this class.</summary>
125 /// <returns>The native class pointer.</returns>
126 public override IntPtr GetEflClass()
128 return Efl.Ui.SliderInterval.efl_ui_slider_interval_class_get();
131 #pragma warning disable CA1707, CS1591, SA1300, SA1600
134 private delegate void efl_ui_slider_interval_value_get_delegate(System.IntPtr obj, System.IntPtr pd, out double from, out double to);
137 public delegate void efl_ui_slider_interval_value_get_api_delegate(System.IntPtr obj, out double from, out double to);
139 public static Efl.Eo.FunctionWrapper<efl_ui_slider_interval_value_get_api_delegate> efl_ui_slider_interval_value_get_ptr = new Efl.Eo.FunctionWrapper<efl_ui_slider_interval_value_get_api_delegate>(Module, "efl_ui_slider_interval_value_get");
141 private static void interval_value_get(System.IntPtr obj, System.IntPtr pd, out double from, out double to)
143 Eina.Log.Debug("function efl_ui_slider_interval_value_get was called");
144 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
147 from = default(double); to = default(double);
150 ((SliderInterval)ws.Target).GetIntervalValue(out from, out to);
154 Eina.Log.Warning($"Callback error: {e.ToString()}");
155 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
162 efl_ui_slider_interval_value_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out from, out to);
166 private static efl_ui_slider_interval_value_get_delegate efl_ui_slider_interval_value_get_static_delegate;
169 private delegate void efl_ui_slider_interval_value_set_delegate(System.IntPtr obj, System.IntPtr pd, double from, double to);
172 public delegate void efl_ui_slider_interval_value_set_api_delegate(System.IntPtr obj, double from, double to);
174 public static Efl.Eo.FunctionWrapper<efl_ui_slider_interval_value_set_api_delegate> efl_ui_slider_interval_value_set_ptr = new Efl.Eo.FunctionWrapper<efl_ui_slider_interval_value_set_api_delegate>(Module, "efl_ui_slider_interval_value_set");
176 private static void interval_value_set(System.IntPtr obj, System.IntPtr pd, double from, double to)
178 Eina.Log.Debug("function efl_ui_slider_interval_value_set was called");
179 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
185 ((SliderInterval)ws.Target).SetIntervalValue(from, to);
189 Eina.Log.Warning($"Callback error: {e.ToString()}");
190 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
197 efl_ui_slider_interval_value_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), from, to);
201 private static efl_ui_slider_interval_value_set_delegate efl_ui_slider_interval_value_set_static_delegate;
203 #pragma warning restore CA1707, CS1591, SA1300, SA1600