[EflSharp] Update Circle and efl cs files (#819)
[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.Threading;
7 using System.ComponentModel;
8 namespace Efl {
9
10 namespace Ui {
11
12 /// <summary>Interface that contains properties regarding the displaying of a range.</summary>
13 [Efl.Ui.IRangeDisplayConcrete.NativeMethods]
14 public interface IRangeDisplay : 
15     Efl.Eo.IWrapper, IDisposable
16 {
17     /// <summary>Control the range value (in percentage) on a given range widget
18 /// Use this call to set range levels.
19 /// 
20 /// 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>
21 /// <returns>The range value (must be between $0.0 and 1.0)</returns>
22 double GetRangeValue();
23     /// <summary>Control the range value (in percentage) on a given range widget
24 /// Use this call to set range levels.
25 /// 
26 /// 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>
27 /// <param name="val">The range value (must be between $0.0 and 1.0)</param>
28 void SetRangeValue(double val);
29     /// <summary>Get the minimum and maximum values of the given range widget.
30 /// Note: If only one value is needed, the other pointer can be passed as <c>null</c>.</summary>
31 /// <param name="min">The minimum value.</param>
32 /// <param name="max">The maximum value.</param>
33 void GetRangeMinMax(out double min, out double max);
34     /// <summary>Set the minimum and maximum values for given range widget.
35 /// Define the allowed range of values to be selected by the user.
36 /// 
37 /// 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"/>
38 /// 
39 /// The minimum and maximum values may be different for each class.
40 /// 
41 /// Warning: maximum must be greater than minimum, otherwise behavior is undefined.</summary>
42 /// <param name="min">The minimum value.</param>
43 /// <param name="max">The maximum value.</param>
44 void SetRangeMinMax(double min, double max);
45                     /// <summary>Control the range value (in percentage) on a given range widget
46 /// Use this call to set range levels.
47 /// 
48 /// 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>
49 /// <value>The range value (must be between $0.0 and 1.0)</value>
50     double RangeValue {
51         get ;
52         set ;
53     }
54 }
55 /// <summary>Interface that contains properties regarding the displaying of a range.</summary>
56 sealed public class IRangeDisplayConcrete : 
57
58 IRangeDisplay
59     
60 {
61     ///<summary>Pointer to the native class description.</summary>
62     public System.IntPtr NativeClass
63     {
64         get
65         {
66             if (((object)this).GetType() == typeof(IRangeDisplayConcrete))
67             {
68                 return GetEflClassStatic();
69             }
70             else
71             {
72                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
73             }
74         }
75     }
76
77     private  System.IntPtr handle;
78     ///<summary>Pointer to the native instance.</summary>
79     public System.IntPtr NativeHandle
80     {
81         get { return handle; }
82     }
83
84     [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
85         efl_ui_range_display_interface_get();
86     /// <summary>Initializes a new instance of the <see cref="IRangeDisplay"/> class.
87     /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
88     private IRangeDisplayConcrete(System.IntPtr raw)
89     {
90         handle = raw;
91     }
92     ///<summary>Destructor.</summary>
93     ~IRangeDisplayConcrete()
94     {
95         Dispose(false);
96     }
97
98     ///<summary>Releases the underlying native instance.</summary>
99     private void Dispose(bool disposing)
100     {
101         if (handle != System.IntPtr.Zero)
102         {
103             IntPtr h = handle;
104             handle = IntPtr.Zero;
105
106             IntPtr gcHandlePtr = IntPtr.Zero;
107             if (disposing)
108             {
109                 Efl.Eo.Globals.efl_mono_native_dispose(h, gcHandlePtr);
110             }
111             else
112             {
113                 Monitor.Enter(Efl.All.InitLock);
114                 if (Efl.All.MainLoopInitialized)
115                 {
116                     Efl.Eo.Globals.efl_mono_thread_safe_native_dispose(h, gcHandlePtr);
117                 }
118
119                 Monitor.Exit(Efl.All.InitLock);
120             }
121         }
122
123     }
124
125     ///<summary>Releases the underlying native instance.</summary>
126     public void Dispose()
127     {
128         Dispose(true);
129         GC.SuppressFinalize(this);
130     }
131
132     /// <summary>Verifies if the given object is equal to this one.</summary>
133     /// <param name="instance">The object to compare to.</param>
134     /// <returns>True if both objects point to the same native object.</returns>
135     public override bool Equals(object instance)
136     {
137         var other = instance as Efl.Object;
138         if (other == null)
139         {
140             return false;
141         }
142         return this.NativeHandle == other.NativeHandle;
143     }
144
145     /// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>
146     /// <returns>The value of the pointer, to be used as the hash code of this object.</returns>
147     public override int GetHashCode()
148     {
149         return this.NativeHandle.ToInt32();
150     }
151
152     /// <summary>Turns the native pointer into a string representation.</summary>
153     /// <returns>A string with the type and the native pointer for this object.</returns>
154     public override String ToString()
155     {
156         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
157     }
158
159     /// <summary>Control the range value (in percentage) on a given range widget
160     /// Use this call to set range levels.
161     /// 
162     /// 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>
163     /// <returns>The range value (must be between $0.0 and 1.0)</returns>
164     public double GetRangeValue() {
165          var _ret_var = Efl.Ui.IRangeDisplayConcrete.NativeMethods.efl_ui_range_value_get_ptr.Value.Delegate(this.NativeHandle);
166         Eina.Error.RaiseIfUnhandledException();
167         return _ret_var;
168  }
169     /// <summary>Control the range value (in percentage) on a given range widget
170     /// Use this call to set range levels.
171     /// 
172     /// 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>
173     /// <param name="val">The range value (must be between $0.0 and 1.0)</param>
174     public void SetRangeValue(double val) {
175                                  Efl.Ui.IRangeDisplayConcrete.NativeMethods.efl_ui_range_value_set_ptr.Value.Delegate(this.NativeHandle,val);
176         Eina.Error.RaiseIfUnhandledException();
177                          }
178     /// <summary>Get the minimum and maximum values of the given range widget.
179     /// Note: If only one value is needed, the other pointer can be passed as <c>null</c>.</summary>
180     /// <param name="min">The minimum value.</param>
181     /// <param name="max">The maximum value.</param>
182     public void GetRangeMinMax(out double min, out double max) {
183                                                          Efl.Ui.IRangeDisplayConcrete.NativeMethods.efl_ui_range_min_max_get_ptr.Value.Delegate(this.NativeHandle,out min, out max);
184         Eina.Error.RaiseIfUnhandledException();
185                                          }
186     /// <summary>Set the minimum and maximum values for given range widget.
187     /// Define the allowed range of values to be selected by the user.
188     /// 
189     /// 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"/>
190     /// 
191     /// The minimum and maximum values may be different for each class.
192     /// 
193     /// Warning: maximum must be greater than minimum, otherwise behavior is undefined.</summary>
194     /// <param name="min">The minimum value.</param>
195     /// <param name="max">The maximum value.</param>
196     public void SetRangeMinMax(double min, double max) {
197                                                          Efl.Ui.IRangeDisplayConcrete.NativeMethods.efl_ui_range_min_max_set_ptr.Value.Delegate(this.NativeHandle,min, max);
198         Eina.Error.RaiseIfUnhandledException();
199                                          }
200     /// <summary>Control the range value (in percentage) on a given range widget
201 /// Use this call to set range levels.
202 /// 
203 /// 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>
204 /// <value>The range value (must be between $0.0 and 1.0)</value>
205     public double RangeValue {
206         get { return GetRangeValue(); }
207         set { SetRangeValue(value); }
208     }
209     private static IntPtr GetEflClassStatic()
210     {
211         return Efl.Ui.IRangeDisplayConcrete.efl_ui_range_display_interface_get();
212     }
213     /// <summary>Wrapper for native methods and virtual method delegates.
214     /// For internal use by generated code only.</summary>
215     public class NativeMethods  : Efl.Eo.NativeClass
216     {
217         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Efl);
218         /// <summary>Gets the list of Eo operations to override.</summary>
219         /// <returns>The list of Eo operations to be overload.</returns>
220         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
221         {
222             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
223             var methods = Efl.Eo.Globals.GetUserMethods(type);
224
225             if (efl_ui_range_value_get_static_delegate == null)
226             {
227                 efl_ui_range_value_get_static_delegate = new efl_ui_range_value_get_delegate(range_value_get);
228             }
229
230             if (methods.FirstOrDefault(m => m.Name == "GetRangeValue") != null)
231             {
232                 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) });
233             }
234
235             if (efl_ui_range_value_set_static_delegate == null)
236             {
237                 efl_ui_range_value_set_static_delegate = new efl_ui_range_value_set_delegate(range_value_set);
238             }
239
240             if (methods.FirstOrDefault(m => m.Name == "SetRangeValue") != null)
241             {
242                 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) });
243             }
244
245             if (efl_ui_range_min_max_get_static_delegate == null)
246             {
247                 efl_ui_range_min_max_get_static_delegate = new efl_ui_range_min_max_get_delegate(range_min_max_get);
248             }
249
250             if (methods.FirstOrDefault(m => m.Name == "GetRangeMinMax") != null)
251             {
252                 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) });
253             }
254
255             if (efl_ui_range_min_max_set_static_delegate == null)
256             {
257                 efl_ui_range_min_max_set_static_delegate = new efl_ui_range_min_max_set_delegate(range_min_max_set);
258             }
259
260             if (methods.FirstOrDefault(m => m.Name == "SetRangeMinMax") != null)
261             {
262                 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) });
263             }
264
265             return descs;
266         }
267         /// <summary>Returns the Eo class for the native methods of this class.</summary>
268         /// <returns>The native class pointer.</returns>
269         public override IntPtr GetEflClass()
270         {
271             return Efl.Ui.IRangeDisplayConcrete.efl_ui_range_display_interface_get();
272         }
273
274         #pragma warning disable CA1707, SA1300, SA1600
275
276         
277         private delegate double efl_ui_range_value_get_delegate(System.IntPtr obj, System.IntPtr pd);
278
279         
280         public delegate double efl_ui_range_value_get_api_delegate(System.IntPtr obj);
281
282         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");
283
284         private static double range_value_get(System.IntPtr obj, System.IntPtr pd)
285         {
286             Eina.Log.Debug("function efl_ui_range_value_get was called");
287             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
288             if (wrapper != null)
289             {
290             double _ret_var = default(double);
291                 try
292                 {
293                     _ret_var = ((IRangeDisplay)wrapper).GetRangeValue();
294                 }
295                 catch (Exception e)
296                 {
297                     Eina.Log.Warning($"Callback error: {e.ToString()}");
298                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
299                 }
300
301         return _ret_var;
302
303             }
304             else
305             {
306                 return efl_ui_range_value_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
307             }
308         }
309
310         private static efl_ui_range_value_get_delegate efl_ui_range_value_get_static_delegate;
311
312         
313         private delegate void efl_ui_range_value_set_delegate(System.IntPtr obj, System.IntPtr pd,  double val);
314
315         
316         public delegate void efl_ui_range_value_set_api_delegate(System.IntPtr obj,  double val);
317
318         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");
319
320         private static void range_value_set(System.IntPtr obj, System.IntPtr pd, double val)
321         {
322             Eina.Log.Debug("function efl_ui_range_value_set was called");
323             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
324             if (wrapper != null)
325             {
326                                     
327                 try
328                 {
329                     ((IRangeDisplay)wrapper).SetRangeValue(val);
330                 }
331                 catch (Exception e)
332                 {
333                     Eina.Log.Warning($"Callback error: {e.ToString()}");
334                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
335                 }
336
337                         
338             }
339             else
340             {
341                 efl_ui_range_value_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), val);
342             }
343         }
344
345         private static efl_ui_range_value_set_delegate efl_ui_range_value_set_static_delegate;
346
347         
348         private delegate void efl_ui_range_min_max_get_delegate(System.IntPtr obj, System.IntPtr pd,  out double min,  out double max);
349
350         
351         public delegate void efl_ui_range_min_max_get_api_delegate(System.IntPtr obj,  out double min,  out double max);
352
353         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");
354
355         private static void range_min_max_get(System.IntPtr obj, System.IntPtr pd, out double min, out double max)
356         {
357             Eina.Log.Debug("function efl_ui_range_min_max_get was called");
358             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
359             if (wrapper != null)
360             {
361                         min = default(double);        max = default(double);                            
362                 try
363                 {
364                     ((IRangeDisplay)wrapper).GetRangeMinMax(out min, out max);
365                 }
366                 catch (Exception e)
367                 {
368                     Eina.Log.Warning($"Callback error: {e.ToString()}");
369                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
370                 }
371
372                                         
373             }
374             else
375             {
376                 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);
377             }
378         }
379
380         private static efl_ui_range_min_max_get_delegate efl_ui_range_min_max_get_static_delegate;
381
382         
383         private delegate void efl_ui_range_min_max_set_delegate(System.IntPtr obj, System.IntPtr pd,  double min,  double max);
384
385         
386         public delegate void efl_ui_range_min_max_set_api_delegate(System.IntPtr obj,  double min,  double max);
387
388         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");
389
390         private static void range_min_max_set(System.IntPtr obj, System.IntPtr pd, double min, double max)
391         {
392             Eina.Log.Debug("function efl_ui_range_min_max_set was called");
393             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
394             if (wrapper != null)
395             {
396                                                             
397                 try
398                 {
399                     ((IRangeDisplay)wrapper).SetRangeMinMax(min, max);
400                 }
401                 catch (Exception e)
402                 {
403                     Eina.Log.Warning($"Callback error: {e.ToString()}");
404                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
405                 }
406
407                                         
408             }
409             else
410             {
411                 efl_ui_range_min_max_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), min, max);
412             }
413         }
414
415         private static efl_ui_range_min_max_set_delegate efl_ui_range_min_max_set_static_delegate;
416
417         #pragma warning restore CA1707, SA1300, SA1600
418
419 }
420 }
421 }
422
423 }
424