[EflSharp] Update Circle and efl cs files (#995)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_control.eo.cs
1 #define EFL_BETA
2 #pragma warning disable CS1591
3 using System;
4 using System.Runtime.InteropServices;
5 using System.Collections.Generic;
6 using System.Linq;
7 using System.Threading;
8 using System.ComponentModel;
9 namespace Efl {
10
11 /// <summary>Efl control interface</summary>
12 /// <remarks>This is a <b>BETA</b> class. It can be modified or removed in the future. Do not use it for product development.</remarks>
13 [Efl.IControlConcrete.NativeMethods]
14 [Efl.Eo.BindingEntity]
15 public interface IControl : 
16     Efl.Eo.IWrapper, IDisposable
17 {
18     /// <summary>Control the priority of the object.</summary>
19 /// <returns>The priority of the object</returns>
20 int GetPriority();
21     /// <summary>Control the priority of the object.</summary>
22 /// <param name="priority">The priority of the object</param>
23 void SetPriority(int priority);
24     /// <summary>Controls whether the object is suspended or not.</summary>
25 /// <returns>Controls whether the object is suspended or not.</returns>
26 bool GetSuspend();
27     /// <summary>Controls whether the object is suspended or not.</summary>
28 /// <param name="suspend">Controls whether the object is suspended or not.</param>
29 void SetSuspend(bool suspend);
30                     /// <summary>Control the priority of the object.</summary>
31     /// <value>The priority of the object</value>
32     int Priority {
33         get;
34         set;
35     }
36     /// <summary>Controls whether the object is suspended or not.</summary>
37     /// <value>Controls whether the object is suspended or not.</value>
38     bool Suspend {
39         get;
40         set;
41     }
42 }
43 /// <summary>Efl control interface</summary>
44 /// <remarks>This is a <b>BETA</b> class. It can be modified or removed in the future. Do not use it for product development.</remarks>
45 sealed public  class IControlConcrete :
46     Efl.Eo.EoWrapper
47     , IControl
48     
49 {
50     /// <summary>Pointer to the native class description.</summary>
51     public override System.IntPtr NativeClass
52     {
53         get
54         {
55             if (((object)this).GetType() == typeof(IControlConcrete))
56             {
57                 return GetEflClassStatic();
58             }
59             else
60             {
61                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
62             }
63         }
64     }
65
66     /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
67     /// Do not call this constructor directly.</summary>
68     /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
69     private IControlConcrete(ConstructingHandle ch) : base(ch)
70     {
71     }
72
73     [System.Runtime.InteropServices.DllImport("libefl.so.1")] internal static extern System.IntPtr
74         efl_control_interface_get();
75     /// <summary>Initializes a new instance of the <see cref="IControl"/> class.
76     /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
77     /// <param name="wh">The native pointer to be wrapped.</param>
78     private IControlConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
79     {
80     }
81
82     /// <summary>Control the priority of the object.</summary>
83     /// <returns>The priority of the object</returns>
84     public int GetPriority() {
85          var _ret_var = Efl.IControlConcrete.NativeMethods.efl_control_priority_get_ptr.Value.Delegate(this.NativeHandle);
86         Eina.Error.RaiseIfUnhandledException();
87         return _ret_var;
88  }
89     /// <summary>Control the priority of the object.</summary>
90     /// <param name="priority">The priority of the object</param>
91     public void SetPriority(int priority) {
92                                  Efl.IControlConcrete.NativeMethods.efl_control_priority_set_ptr.Value.Delegate(this.NativeHandle,priority);
93         Eina.Error.RaiseIfUnhandledException();
94                          }
95     /// <summary>Controls whether the object is suspended or not.</summary>
96     /// <returns>Controls whether the object is suspended or not.</returns>
97     public bool GetSuspend() {
98          var _ret_var = Efl.IControlConcrete.NativeMethods.efl_control_suspend_get_ptr.Value.Delegate(this.NativeHandle);
99         Eina.Error.RaiseIfUnhandledException();
100         return _ret_var;
101  }
102     /// <summary>Controls whether the object is suspended or not.</summary>
103     /// <param name="suspend">Controls whether the object is suspended or not.</param>
104     public void SetSuspend(bool suspend) {
105                                  Efl.IControlConcrete.NativeMethods.efl_control_suspend_set_ptr.Value.Delegate(this.NativeHandle,suspend);
106         Eina.Error.RaiseIfUnhandledException();
107                          }
108     /// <summary>Control the priority of the object.</summary>
109     /// <value>The priority of the object</value>
110     public int Priority {
111         get { return GetPriority(); }
112         set { SetPriority(value); }
113     }
114     /// <summary>Controls whether the object is suspended or not.</summary>
115     /// <value>Controls whether the object is suspended or not.</value>
116     public bool Suspend {
117         get { return GetSuspend(); }
118         set { SetSuspend(value); }
119     }
120     private static IntPtr GetEflClassStatic()
121     {
122         return Efl.IControlConcrete.efl_control_interface_get();
123     }
124     /// <summary>Wrapper for native methods and virtual method delegates.
125     /// For internal use by generated code only.</summary>
126     public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
127     {
128         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Efl);
129         /// <summary>Gets the list of Eo operations to override.</summary>
130         /// <returns>The list of Eo operations to be overload.</returns>
131         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
132         {
133             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
134             var methods = Efl.Eo.Globals.GetUserMethods(type);
135
136             if (efl_control_priority_get_static_delegate == null)
137             {
138                 efl_control_priority_get_static_delegate = new efl_control_priority_get_delegate(priority_get);
139             }
140
141             if (methods.FirstOrDefault(m => m.Name == "GetPriority") != null)
142             {
143                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_control_priority_get"), func = Marshal.GetFunctionPointerForDelegate(efl_control_priority_get_static_delegate) });
144             }
145
146             if (efl_control_priority_set_static_delegate == null)
147             {
148                 efl_control_priority_set_static_delegate = new efl_control_priority_set_delegate(priority_set);
149             }
150
151             if (methods.FirstOrDefault(m => m.Name == "SetPriority") != null)
152             {
153                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_control_priority_set"), func = Marshal.GetFunctionPointerForDelegate(efl_control_priority_set_static_delegate) });
154             }
155
156             if (efl_control_suspend_get_static_delegate == null)
157             {
158                 efl_control_suspend_get_static_delegate = new efl_control_suspend_get_delegate(suspend_get);
159             }
160
161             if (methods.FirstOrDefault(m => m.Name == "GetSuspend") != null)
162             {
163                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_control_suspend_get"), func = Marshal.GetFunctionPointerForDelegate(efl_control_suspend_get_static_delegate) });
164             }
165
166             if (efl_control_suspend_set_static_delegate == null)
167             {
168                 efl_control_suspend_set_static_delegate = new efl_control_suspend_set_delegate(suspend_set);
169             }
170
171             if (methods.FirstOrDefault(m => m.Name == "SetSuspend") != null)
172             {
173                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_control_suspend_set"), func = Marshal.GetFunctionPointerForDelegate(efl_control_suspend_set_static_delegate) });
174             }
175
176             return descs;
177         }
178         /// <summary>Returns the Eo class for the native methods of this class.</summary>
179         /// <returns>The native class pointer.</returns>
180         public override IntPtr GetEflClass()
181         {
182             return Efl.IControlConcrete.efl_control_interface_get();
183         }
184
185         #pragma warning disable CA1707, CS1591, SA1300, SA1600
186
187         
188         private delegate int efl_control_priority_get_delegate(System.IntPtr obj, System.IntPtr pd);
189
190         
191         public delegate int efl_control_priority_get_api_delegate(System.IntPtr obj);
192
193         public static Efl.Eo.FunctionWrapper<efl_control_priority_get_api_delegate> efl_control_priority_get_ptr = new Efl.Eo.FunctionWrapper<efl_control_priority_get_api_delegate>(Module, "efl_control_priority_get");
194
195         private static int priority_get(System.IntPtr obj, System.IntPtr pd)
196         {
197             Eina.Log.Debug("function efl_control_priority_get was called");
198             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
199             if (ws != null)
200             {
201             int _ret_var = default(int);
202                 try
203                 {
204                     _ret_var = ((IControl)ws.Target).GetPriority();
205                 }
206                 catch (Exception e)
207                 {
208                     Eina.Log.Warning($"Callback error: {e.ToString()}");
209                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
210                 }
211
212         return _ret_var;
213
214             }
215             else
216             {
217                 return efl_control_priority_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
218             }
219         }
220
221         private static efl_control_priority_get_delegate efl_control_priority_get_static_delegate;
222
223         
224         private delegate void efl_control_priority_set_delegate(System.IntPtr obj, System.IntPtr pd,  int priority);
225
226         
227         public delegate void efl_control_priority_set_api_delegate(System.IntPtr obj,  int priority);
228
229         public static Efl.Eo.FunctionWrapper<efl_control_priority_set_api_delegate> efl_control_priority_set_ptr = new Efl.Eo.FunctionWrapper<efl_control_priority_set_api_delegate>(Module, "efl_control_priority_set");
230
231         private static void priority_set(System.IntPtr obj, System.IntPtr pd, int priority)
232         {
233             Eina.Log.Debug("function efl_control_priority_set was called");
234             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
235             if (ws != null)
236             {
237                                     
238                 try
239                 {
240                     ((IControl)ws.Target).SetPriority(priority);
241                 }
242                 catch (Exception e)
243                 {
244                     Eina.Log.Warning($"Callback error: {e.ToString()}");
245                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
246                 }
247
248                         
249             }
250             else
251             {
252                 efl_control_priority_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), priority);
253             }
254         }
255
256         private static efl_control_priority_set_delegate efl_control_priority_set_static_delegate;
257
258         [return: MarshalAs(UnmanagedType.U1)]
259         private delegate bool efl_control_suspend_get_delegate(System.IntPtr obj, System.IntPtr pd);
260
261         [return: MarshalAs(UnmanagedType.U1)]
262         public delegate bool efl_control_suspend_get_api_delegate(System.IntPtr obj);
263
264         public static Efl.Eo.FunctionWrapper<efl_control_suspend_get_api_delegate> efl_control_suspend_get_ptr = new Efl.Eo.FunctionWrapper<efl_control_suspend_get_api_delegate>(Module, "efl_control_suspend_get");
265
266         private static bool suspend_get(System.IntPtr obj, System.IntPtr pd)
267         {
268             Eina.Log.Debug("function efl_control_suspend_get was called");
269             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
270             if (ws != null)
271             {
272             bool _ret_var = default(bool);
273                 try
274                 {
275                     _ret_var = ((IControl)ws.Target).GetSuspend();
276                 }
277                 catch (Exception e)
278                 {
279                     Eina.Log.Warning($"Callback error: {e.ToString()}");
280                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
281                 }
282
283         return _ret_var;
284
285             }
286             else
287             {
288                 return efl_control_suspend_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
289             }
290         }
291
292         private static efl_control_suspend_get_delegate efl_control_suspend_get_static_delegate;
293
294         
295         private delegate void efl_control_suspend_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.U1)] bool suspend);
296
297         
298         public delegate void efl_control_suspend_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.U1)] bool suspend);
299
300         public static Efl.Eo.FunctionWrapper<efl_control_suspend_set_api_delegate> efl_control_suspend_set_ptr = new Efl.Eo.FunctionWrapper<efl_control_suspend_set_api_delegate>(Module, "efl_control_suspend_set");
301
302         private static void suspend_set(System.IntPtr obj, System.IntPtr pd, bool suspend)
303         {
304             Eina.Log.Debug("function efl_control_suspend_set was called");
305             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
306             if (ws != null)
307             {
308                                     
309                 try
310                 {
311                     ((IControl)ws.Target).SetSuspend(suspend);
312                 }
313                 catch (Exception e)
314                 {
315                     Eina.Log.Warning($"Callback error: {e.ToString()}");
316                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
317                 }
318
319                         
320             }
321             else
322             {
323                 efl_control_suspend_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), suspend);
324             }
325         }
326
327         private static efl_control_suspend_set_delegate efl_control_suspend_set_static_delegate;
328
329         #pragma warning restore CA1707, CS1591, SA1300, SA1600
330
331 }
332 }
333 }
334
335 #if EFL_BETA
336 #pragma warning disable CS1591
337 public static class EflIControlConcrete_ExtensionMethods {
338     public static Efl.BindableProperty<int> Priority<T>(this Efl.Ui.ItemFactory<T> fac, Efl.Csharp.ExtensionTag<Efl.IControl, T>magic = null) where T : Efl.IControl {
339         return new Efl.BindableProperty<int>("priority", fac);
340     }
341
342     public static Efl.BindableProperty<bool> Suspend<T>(this Efl.Ui.ItemFactory<T> fac, Efl.Csharp.ExtensionTag<Efl.IControl, T>magic = null) where T : Efl.IControl {
343         return new Efl.BindableProperty<bool>("suspend", fac);
344     }
345
346 }
347 #pragma warning restore CS1591
348 #endif