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