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 public class SliderInterval : Efl.Ui.Slider
17 ///<summary>Pointer to the native class description.</summary>
18 public override System.IntPtr NativeClass
22 if (((object)this).GetType() == typeof(SliderInterval))
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_slider_interval_class_get();
35 /// <summary>Initializes a new instance of the <see cref="SliderInterval"/> class.</summary>
36 /// <param name="parent">Parent instance.</param>
37 /// <param name="style">The widget style to use. See <see cref="Efl.Ui.Widget.SetStyle"/></param>
38 public SliderInterval(Efl.Object parent
39 , System.String style = null) : base(efl_ui_slider_interval_class_get(), typeof(SliderInterval), parent)
41 if (Efl.Eo.Globals.ParamHelperCheck(style))
43 SetStyle(Efl.Eo.Globals.GetParamHelper(style));
46 FinishInstantiation();
49 /// <summary>Initializes a new instance of the <see cref="SliderInterval"/> 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="raw">The native pointer to be wrapped.</param>
52 protected SliderInterval(System.IntPtr raw) : base(raw)
56 /// <summary>Initializes a new instance of the <see cref="SliderInterval"/> 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="managedType">The managed type of the public constructor that originated this call.</param>
60 /// <param name="parent">The Efl.Object parent of this instance.</param>
61 protected SliderInterval(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
65 /// <summary>Sets up position of two indicators at start and end position.</summary>
66 /// <param name="from">interval minimum value</param>
67 /// <param name="to">interval maximum value</param>
68 virtual public void GetIntervalValue(out double from, out double to) {
69 Efl.Ui.SliderInterval.NativeMethods.efl_ui_slider_interval_value_get_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),out from, out to);
70 Eina.Error.RaiseIfUnhandledException();
72 /// <summary>Sets up position of two indicators at start and end position.</summary>
73 /// <param name="from">interval minimum value</param>
74 /// <param name="to">interval maximum value</param>
75 virtual public void SetIntervalValue(double from, double to) {
76 Efl.Ui.SliderInterval.NativeMethods.efl_ui_slider_interval_value_set_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),from, to);
77 Eina.Error.RaiseIfUnhandledException();
79 private static IntPtr GetEflClassStatic()
81 return Efl.Ui.SliderInterval.efl_ui_slider_interval_class_get();
83 /// <summary>Wrapper for native methods and virtual method delegates.
84 /// For internal use by generated code only.</summary>
85 public new class NativeMethods : Efl.Ui.Slider.NativeMethods
87 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Elementary);
88 /// <summary>Gets the list of Eo operations to override.</summary>
89 /// <returns>The list of Eo operations to be overload.</returns>
90 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
92 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
93 var methods = Efl.Eo.Globals.GetUserMethods(type);
95 if (efl_ui_slider_interval_value_get_static_delegate == null)
97 efl_ui_slider_interval_value_get_static_delegate = new efl_ui_slider_interval_value_get_delegate(interval_value_get);
100 if (methods.FirstOrDefault(m => m.Name == "GetIntervalValue") != null)
102 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) });
105 if (efl_ui_slider_interval_value_set_static_delegate == null)
107 efl_ui_slider_interval_value_set_static_delegate = new efl_ui_slider_interval_value_set_delegate(interval_value_set);
110 if (methods.FirstOrDefault(m => m.Name == "SetIntervalValue") != null)
112 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) });
115 descs.AddRange(base.GetEoOps(type));
118 /// <summary>Returns the Eo class for the native methods of this class.</summary>
119 /// <returns>The native class pointer.</returns>
120 public override IntPtr GetEflClass()
122 return Efl.Ui.SliderInterval.efl_ui_slider_interval_class_get();
125 #pragma warning disable CA1707, CS1591, SA1300, SA1600
128 private delegate void efl_ui_slider_interval_value_get_delegate(System.IntPtr obj, System.IntPtr pd, out double from, out double to);
131 public delegate void efl_ui_slider_interval_value_get_api_delegate(System.IntPtr obj, out double from, out double to);
133 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");
135 private static void interval_value_get(System.IntPtr obj, System.IntPtr pd, out double from, out double to)
137 Eina.Log.Debug("function efl_ui_slider_interval_value_get was called");
138 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
141 from = default(double); to = default(double);
144 ((SliderInterval)ws.Target).GetIntervalValue(out from, out to);
148 Eina.Log.Warning($"Callback error: {e.ToString()}");
149 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
156 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);
160 private static efl_ui_slider_interval_value_get_delegate efl_ui_slider_interval_value_get_static_delegate;
163 private delegate void efl_ui_slider_interval_value_set_delegate(System.IntPtr obj, System.IntPtr pd, double from, double to);
166 public delegate void efl_ui_slider_interval_value_set_api_delegate(System.IntPtr obj, double from, double to);
168 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");
170 private static void interval_value_set(System.IntPtr obj, System.IntPtr pd, double from, double to)
172 Eina.Log.Debug("function efl_ui_slider_interval_value_set was called");
173 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
179 ((SliderInterval)ws.Target).SetIntervalValue(from, to);
183 Eina.Log.Warning($"Callback error: {e.ToString()}");
184 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
191 efl_ui_slider_interval_value_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), from, to);
195 private static efl_ui_slider_interval_value_set_delegate efl_ui_slider_interval_value_set_static_delegate;
197 #pragma warning restore CA1707, CS1591, SA1300, SA1600