[EflSharp] Separate efl and Circle cs files and Update cs files (#786)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_ui_range_display.eo.cs
1 #pragma warning disable CS1591
2 using System;
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
5 using System.Linq;
6 using System.ComponentModel;
7 namespace Efl { namespace Ui { 
8 /// <summary>Interface that contains properties regarding the displaying of a range.</summary>
9 [IRangeDisplayNativeInherit]
10 public interface IRangeDisplay : 
11     Efl.Eo.IWrapper, IDisposable
12 {
13     /// <summary>Control the range value (in percentage) on a given range widget
14 /// Use this call to set range levels.
15 /// 
16 /// 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>
17 /// <returns>The range value (must be between $0.0 and 1.0)</returns>
18 double GetRangeValue();
19     /// <summary>Control the range value (in percentage) on a given range widget
20 /// Use this call to set range levels.
21 /// 
22 /// 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>
23 /// <param name="val">The range value (must be between $0.0 and 1.0)</param>
24 /// <returns></returns>
25 void SetRangeValue( double val);
26     /// <summary>Get the minimum and maximum values of the given range widget.
27 /// Note: If only one value is needed, the other pointer can be passed as <c>null</c>.</summary>
28 /// <param name="min">The minimum value.</param>
29 /// <param name="max">The maximum value.</param>
30 /// <returns></returns>
31 void GetRangeMinMax( out double min,  out double max);
32     /// <summary>Set the minimum and maximum values for given range widget.
33 /// Define the allowed range of values to be selected by the user.
34 /// 
35 /// 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"/>
36 /// 
37 /// The minimum and maximum values may be different for each class.
38 /// 
39 /// Warning: maximum must be greater than minimum, otherwise behavior is undefined.</summary>
40 /// <param name="min">The minimum value.</param>
41 /// <param name="max">The maximum value.</param>
42 /// <returns></returns>
43 void SetRangeMinMax( double min,  double max);
44                     /// <summary>Control the range value (in percentage) on a given range widget
45 /// Use this call to set range levels.
46 /// 
47 /// 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>
48 /// <value>The range value (must be between $0.0 and 1.0)</value>
49     double RangeValue {
50         get ;
51         set ;
52     }
53 }
54 /// <summary>Interface that contains properties regarding the displaying of a range.</summary>
55 sealed public class IRangeDisplayConcrete : 
56
57 IRangeDisplay
58     
59 {
60     ///<summary>Pointer to the native class description.</summary>
61     public System.IntPtr NativeClass {
62         get {
63             if (((object)this).GetType() == typeof (IRangeDisplayConcrete))
64                 return Efl.Ui.IRangeDisplayNativeInherit.GetEflClassStatic();
65             else
66                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
67         }
68     }
69     private  System.IntPtr handle;
70     ///<summary>Pointer to the native instance.</summary>
71     public System.IntPtr NativeHandle {
72         get { return handle; }
73     }
74     [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
75         efl_ui_range_display_interface_get();
76     ///<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>
77     private IRangeDisplayConcrete(System.IntPtr raw)
78     {
79         handle = raw;
80         RegisterEventProxies();
81     }
82     ///<summary>Destructor.</summary>
83     ~IRangeDisplayConcrete()
84     {
85         Dispose(false);
86     }
87     ///<summary>Releases the underlying native instance.</summary>
88     void Dispose(bool disposing)
89     {
90         if (handle != System.IntPtr.Zero) {
91             Efl.Eo.Globals.efl_unref(handle);
92             handle = System.IntPtr.Zero;
93         }
94     }
95     ///<summary>Releases the underlying native instance.</summary>
96     public void Dispose()
97     {
98         Dispose(true);
99         GC.SuppressFinalize(this);
100     }
101     ///<summary>Verifies if the given object is equal to this one.</summary>
102     public override bool Equals(object obj)
103     {
104         var other = obj as Efl.Object;
105         if (other == null)
106             return false;
107         return this.NativeHandle == other.NativeHandle;
108     }
109     ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
110     public override int GetHashCode()
111     {
112         return this.NativeHandle.ToInt32();
113     }
114     ///<summary>Turns the native pointer into a string representation.</summary>
115     public override String ToString()
116     {
117         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
118     }
119     ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
120      void RegisterEventProxies()
121     {
122     }
123     /// <summary>Control the range value (in percentage) on a given range widget
124     /// Use this call to set range levels.
125     /// 
126     /// 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>
127     /// <returns>The range value (must be between $0.0 and 1.0)</returns>
128     public double GetRangeValue() {
129          var _ret_var = Efl.Ui.IRangeDisplayNativeInherit.efl_ui_range_value_get_ptr.Value.Delegate(this.NativeHandle);
130         Eina.Error.RaiseIfUnhandledException();
131         return _ret_var;
132  }
133     /// <summary>Control the range value (in percentage) on a given range widget
134     /// Use this call to set range levels.
135     /// 
136     /// 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>
137     /// <param name="val">The range value (must be between $0.0 and 1.0)</param>
138     /// <returns></returns>
139     public void SetRangeValue( double val) {
140                                  Efl.Ui.IRangeDisplayNativeInherit.efl_ui_range_value_set_ptr.Value.Delegate(this.NativeHandle, val);
141         Eina.Error.RaiseIfUnhandledException();
142                          }
143     /// <summary>Get the minimum and maximum values of the given range widget.
144     /// Note: If only one value is needed, the other pointer can be passed as <c>null</c>.</summary>
145     /// <param name="min">The minimum value.</param>
146     /// <param name="max">The maximum value.</param>
147     /// <returns></returns>
148     public void GetRangeMinMax( out double min,  out double max) {
149                                                          Efl.Ui.IRangeDisplayNativeInherit.efl_ui_range_min_max_get_ptr.Value.Delegate(this.NativeHandle, out min,  out max);
150         Eina.Error.RaiseIfUnhandledException();
151                                          }
152     /// <summary>Set the minimum and maximum values for given range widget.
153     /// Define the allowed range of values to be selected by the user.
154     /// 
155     /// 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"/>
156     /// 
157     /// The minimum and maximum values may be different for each class.
158     /// 
159     /// Warning: maximum must be greater than minimum, otherwise behavior is undefined.</summary>
160     /// <param name="min">The minimum value.</param>
161     /// <param name="max">The maximum value.</param>
162     /// <returns></returns>
163     public void SetRangeMinMax( double min,  double max) {
164                                                          Efl.Ui.IRangeDisplayNativeInherit.efl_ui_range_min_max_set_ptr.Value.Delegate(this.NativeHandle, min,  max);
165         Eina.Error.RaiseIfUnhandledException();
166                                          }
167     /// <summary>Control the range value (in percentage) on a given range widget
168 /// Use this call to set range levels.
169 /// 
170 /// 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>
171 /// <value>The range value (must be between $0.0 and 1.0)</value>
172     public double RangeValue {
173         get { return GetRangeValue(); }
174         set { SetRangeValue( value); }
175     }
176     private static IntPtr GetEflClassStatic()
177     {
178         return Efl.Ui.IRangeDisplayConcrete.efl_ui_range_display_interface_get();
179     }
180 }
181 public class IRangeDisplayNativeInherit  : Efl.Eo.NativeClass{
182     public  static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Efl);
183     public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
184     {
185         var descs = new System.Collections.Generic.List<Efl_Op_Description>();
186         var methods = Efl.Eo.Globals.GetUserMethods(type);
187         if (efl_ui_range_value_get_static_delegate == null)
188             efl_ui_range_value_get_static_delegate = new efl_ui_range_value_get_delegate(range_value_get);
189         if (methods.FirstOrDefault(m => m.Name == "GetRangeValue") != null)
190             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)});
191         if (efl_ui_range_value_set_static_delegate == null)
192             efl_ui_range_value_set_static_delegate = new efl_ui_range_value_set_delegate(range_value_set);
193         if (methods.FirstOrDefault(m => m.Name == "SetRangeValue") != null)
194             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)});
195         if (efl_ui_range_min_max_get_static_delegate == null)
196             efl_ui_range_min_max_get_static_delegate = new efl_ui_range_min_max_get_delegate(range_min_max_get);
197         if (methods.FirstOrDefault(m => m.Name == "GetRangeMinMax") != null)
198             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)});
199         if (efl_ui_range_min_max_set_static_delegate == null)
200             efl_ui_range_min_max_set_static_delegate = new efl_ui_range_min_max_set_delegate(range_min_max_set);
201         if (methods.FirstOrDefault(m => m.Name == "SetRangeMinMax") != null)
202             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)});
203         return descs;
204     }
205     public override IntPtr GetEflClass()
206     {
207         return Efl.Ui.IRangeDisplayConcrete.efl_ui_range_display_interface_get();
208     }
209     public static  IntPtr GetEflClassStatic()
210     {
211         return Efl.Ui.IRangeDisplayConcrete.efl_ui_range_display_interface_get();
212     }
213
214
215      private delegate double efl_ui_range_value_get_delegate(System.IntPtr obj, System.IntPtr pd);
216
217
218      public delegate double efl_ui_range_value_get_api_delegate(System.IntPtr obj);
219      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");
220      private static double range_value_get(System.IntPtr obj, System.IntPtr pd)
221     {
222         Eina.Log.Debug("function efl_ui_range_value_get was called");
223         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
224         if(wrapper != null) {
225                         double _ret_var = default(double);
226             try {
227                 _ret_var = ((IRangeDisplay)wrapper).GetRangeValue();
228             } catch (Exception e) {
229                 Eina.Log.Warning($"Callback error: {e.ToString()}");
230                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
231             }
232         return _ret_var;
233         } else {
234             return efl_ui_range_value_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
235         }
236     }
237     private static efl_ui_range_value_get_delegate efl_ui_range_value_get_static_delegate;
238
239
240      private delegate void efl_ui_range_value_set_delegate(System.IntPtr obj, System.IntPtr pd,   double val);
241
242
243      public delegate void efl_ui_range_value_set_api_delegate(System.IntPtr obj,   double val);
244      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");
245      private static void range_value_set(System.IntPtr obj, System.IntPtr pd,  double val)
246     {
247         Eina.Log.Debug("function efl_ui_range_value_set was called");
248         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
249         if(wrapper != null) {
250                                                 
251             try {
252                 ((IRangeDisplay)wrapper).SetRangeValue( val);
253             } catch (Exception e) {
254                 Eina.Log.Warning($"Callback error: {e.ToString()}");
255                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
256             }
257                                 } else {
258             efl_ui_range_value_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  val);
259         }
260     }
261     private static efl_ui_range_value_set_delegate efl_ui_range_value_set_static_delegate;
262
263
264      private delegate void efl_ui_range_min_max_get_delegate(System.IntPtr obj, System.IntPtr pd,   out double min,   out double max);
265
266
267      public delegate void efl_ui_range_min_max_get_api_delegate(System.IntPtr obj,   out double min,   out double max);
268      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");
269      private static void range_min_max_get(System.IntPtr obj, System.IntPtr pd,  out double min,  out double max)
270     {
271         Eina.Log.Debug("function efl_ui_range_min_max_get was called");
272         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
273         if(wrapper != null) {
274                                     min = default(double);        max = default(double);                            
275             try {
276                 ((IRangeDisplay)wrapper).GetRangeMinMax( out min,  out max);
277             } catch (Exception e) {
278                 Eina.Log.Warning($"Callback error: {e.ToString()}");
279                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
280             }
281                                                 } else {
282             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);
283         }
284     }
285     private static efl_ui_range_min_max_get_delegate efl_ui_range_min_max_get_static_delegate;
286
287
288      private delegate void efl_ui_range_min_max_set_delegate(System.IntPtr obj, System.IntPtr pd,   double min,   double max);
289
290
291      public delegate void efl_ui_range_min_max_set_api_delegate(System.IntPtr obj,   double min,   double max);
292      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");
293      private static void range_min_max_set(System.IntPtr obj, System.IntPtr pd,  double min,  double max)
294     {
295         Eina.Log.Debug("function efl_ui_range_min_max_set was called");
296         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
297         if(wrapper != null) {
298                                                                         
299             try {
300                 ((IRangeDisplay)wrapper).SetRangeMinMax( min,  max);
301             } catch (Exception e) {
302                 Eina.Log.Warning($"Callback error: {e.ToString()}");
303                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
304             }
305                                                 } else {
306             efl_ui_range_min_max_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  min,  max);
307         }
308     }
309     private static efl_ui_range_min_max_set_delegate efl_ui_range_min_max_set_static_delegate;
310 }
311 } }