[EflSharp] Introduce EflSharp project (#749)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / 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.ComponentModel;
7 namespace Efl { 
8 /// <summary>Efl control interface</summary>
9 [ControlNativeInherit]
10 public interface Control : 
11    Efl.Eo.IWrapper, IDisposable
12 {
13    /// <summary>Control the priority of the object.</summary>
14 /// <returns>The priority of the object</returns>
15  int GetPriority();
16    /// <summary>Control the priority of the object.</summary>
17 /// <param name="priority">The priority of the object</param>
18 /// <returns></returns>
19  void SetPriority(  int priority);
20    /// <summary>Controls whether the object is suspended or not.</summary>
21 /// <returns>Controls whether the object is suspended or not.</returns>
22 bool GetSuspend();
23    /// <summary>Controls whether the object is suspended or not.</summary>
24 /// <param name="suspend">Controls whether the object is suspended or not.</param>
25 /// <returns></returns>
26  void SetSuspend( bool suspend);
27                /// <summary>Control the priority of the object.</summary>
28 /// <value>The priority of the object</value>
29     int Priority {
30       get ;
31       set ;
32    }
33    /// <summary>Controls whether the object is suspended or not.</summary>
34 /// <value>Controls whether the object is suspended or not.</value>
35    bool Suspend {
36       get ;
37       set ;
38    }
39 }
40 /// <summary>Efl control interface</summary>
41 sealed public class ControlConcrete : 
42
43 Control
44    
45 {
46    ///<summary>Pointer to the native class description.</summary>
47    public System.IntPtr NativeClass {
48       get {
49          if (((object)this).GetType() == typeof (ControlConcrete))
50             return Efl.ControlNativeInherit.GetEflClassStatic();
51          else
52             return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
53       }
54    }
55    private  System.IntPtr handle;
56    ///<summary>Pointer to the native instance.</summary>
57    public System.IntPtr NativeHandle {
58       get { return handle; }
59    }
60    [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
61       efl_control_interface_get();
62    ///<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>
63    public ControlConcrete(System.IntPtr raw)
64    {
65       handle = raw;
66       register_event_proxies();
67    }
68    ///<summary>Destructor.</summary>
69    ~ControlConcrete()
70    {
71       Dispose(false);
72    }
73    ///<summary>Releases the underlying native instance.</summary>
74    void Dispose(bool disposing)
75    {
76       if (handle != System.IntPtr.Zero) {
77          Efl.Eo.Globals.efl_unref(handle);
78          handle = System.IntPtr.Zero;
79       }
80    }
81    ///<summary>Releases the underlying native instance.</summary>
82    public void Dispose()
83    {
84       Dispose(true);
85       GC.SuppressFinalize(this);
86    }
87    ///<summary>Casts obj into an instance of this type.</summary>
88    public static ControlConcrete static_cast(Efl.Object obj)
89    {
90       if (obj == null)
91          throw new System.ArgumentNullException("obj");
92       return new ControlConcrete(obj.NativeHandle);
93    }
94    ///<summary>Verifies if the given object is equal to this one.</summary>
95    public override bool Equals(object obj)
96    {
97       var other = obj as Efl.Object;
98       if (other == null)
99          return false;
100       return this.NativeHandle == other.NativeHandle;
101    }
102    ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
103    public override int GetHashCode()
104    {
105       return this.NativeHandle.ToInt32();
106    }
107    ///<summary>Turns the native pointer into a string representation.</summary>
108    public override String ToString()
109    {
110       return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
111    }
112     void register_event_proxies()
113    {
114    }
115    /// <summary>Control the priority of the object.</summary>
116    /// <returns>The priority of the object</returns>
117    public  int GetPriority() {
118        var _ret_var = Efl.ControlNativeInherit.efl_control_priority_get_ptr.Value.Delegate(this.NativeHandle);
119       Eina.Error.RaiseIfUnhandledException();
120       return _ret_var;
121  }
122    /// <summary>Control the priority of the object.</summary>
123    /// <param name="priority">The priority of the object</param>
124    /// <returns></returns>
125    public  void SetPriority(  int priority) {
126                          Efl.ControlNativeInherit.efl_control_priority_set_ptr.Value.Delegate(this.NativeHandle, priority);
127       Eina.Error.RaiseIfUnhandledException();
128                    }
129    /// <summary>Controls whether the object is suspended or not.</summary>
130    /// <returns>Controls whether the object is suspended or not.</returns>
131    public bool GetSuspend() {
132        var _ret_var = Efl.ControlNativeInherit.efl_control_suspend_get_ptr.Value.Delegate(this.NativeHandle);
133       Eina.Error.RaiseIfUnhandledException();
134       return _ret_var;
135  }
136    /// <summary>Controls whether the object is suspended or not.</summary>
137    /// <param name="suspend">Controls whether the object is suspended or not.</param>
138    /// <returns></returns>
139    public  void SetSuspend( bool suspend) {
140                          Efl.ControlNativeInherit.efl_control_suspend_set_ptr.Value.Delegate(this.NativeHandle, suspend);
141       Eina.Error.RaiseIfUnhandledException();
142                    }
143    /// <summary>Control the priority of the object.</summary>
144 /// <value>The priority of the object</value>
145    public  int Priority {
146       get { return GetPriority(); }
147       set { SetPriority( value); }
148    }
149    /// <summary>Controls whether the object is suspended or not.</summary>
150 /// <value>Controls whether the object is suspended or not.</value>
151    public bool Suspend {
152       get { return GetSuspend(); }
153       set { SetSuspend( value); }
154    }
155 }
156 public class ControlNativeInherit  : Efl.Eo.NativeClass{
157    public  static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Efl);
158    public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
159    {
160       var descs = new System.Collections.Generic.List<Efl_Op_Description>();
161       if (efl_control_priority_get_static_delegate == null)
162       efl_control_priority_get_static_delegate = new efl_control_priority_get_delegate(priority_get);
163       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)});
164       if (efl_control_priority_set_static_delegate == null)
165       efl_control_priority_set_static_delegate = new efl_control_priority_set_delegate(priority_set);
166       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)});
167       if (efl_control_suspend_get_static_delegate == null)
168       efl_control_suspend_get_static_delegate = new efl_control_suspend_get_delegate(suspend_get);
169       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)});
170       if (efl_control_suspend_set_static_delegate == null)
171       efl_control_suspend_set_static_delegate = new efl_control_suspend_set_delegate(suspend_set);
172       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)});
173       return descs;
174    }
175    public override IntPtr GetEflClass()
176    {
177       return Efl.ControlConcrete.efl_control_interface_get();
178    }
179    public static  IntPtr GetEflClassStatic()
180    {
181       return Efl.ControlConcrete.efl_control_interface_get();
182    }
183
184
185     private delegate  int efl_control_priority_get_delegate(System.IntPtr obj, System.IntPtr pd);
186
187
188     public delegate  int efl_control_priority_get_api_delegate(System.IntPtr obj);
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     private static  int priority_get(System.IntPtr obj, System.IntPtr pd)
191    {
192       Eina.Log.Debug("function efl_control_priority_get was called");
193       Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
194       if(wrapper != null) {
195                    int _ret_var = default( int);
196          try {
197             _ret_var = ((Control)wrapper).GetPriority();
198          } catch (Exception e) {
199             Eina.Log.Warning($"Callback error: {e.ToString()}");
200             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
201          }
202       return _ret_var;
203       } else {
204          return efl_control_priority_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
205       }
206    }
207    private static efl_control_priority_get_delegate efl_control_priority_get_static_delegate;
208
209
210     private delegate  void efl_control_priority_set_delegate(System.IntPtr obj, System.IntPtr pd,    int priority);
211
212
213     public delegate  void efl_control_priority_set_api_delegate(System.IntPtr obj,    int priority);
214     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");
215     private static  void priority_set(System.IntPtr obj, System.IntPtr pd,   int priority)
216    {
217       Eina.Log.Debug("function efl_control_priority_set was called");
218       Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
219       if(wrapper != null) {
220                                     
221          try {
222             ((Control)wrapper).SetPriority( priority);
223          } catch (Exception e) {
224             Eina.Log.Warning($"Callback error: {e.ToString()}");
225             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
226          }
227                         } else {
228          efl_control_priority_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  priority);
229       }
230    }
231    private static efl_control_priority_set_delegate efl_control_priority_set_static_delegate;
232
233
234     [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_control_suspend_get_delegate(System.IntPtr obj, System.IntPtr pd);
235
236
237     [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_control_suspend_get_api_delegate(System.IntPtr obj);
238     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");
239     private static bool suspend_get(System.IntPtr obj, System.IntPtr pd)
240    {
241       Eina.Log.Debug("function efl_control_suspend_get was called");
242       Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
243       if(wrapper != null) {
244                   bool _ret_var = default(bool);
245          try {
246             _ret_var = ((Control)wrapper).GetSuspend();
247          } catch (Exception e) {
248             Eina.Log.Warning($"Callback error: {e.ToString()}");
249             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
250          }
251       return _ret_var;
252       } else {
253          return efl_control_suspend_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
254       }
255    }
256    private static efl_control_suspend_get_delegate efl_control_suspend_get_static_delegate;
257
258
259     private delegate  void efl_control_suspend_set_delegate(System.IntPtr obj, System.IntPtr pd,  [MarshalAs(UnmanagedType.U1)]  bool suspend);
260
261
262     public delegate  void efl_control_suspend_set_api_delegate(System.IntPtr obj,  [MarshalAs(UnmanagedType.U1)]  bool suspend);
263     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");
264     private static  void suspend_set(System.IntPtr obj, System.IntPtr pd,  bool suspend)
265    {
266       Eina.Log.Debug("function efl_control_suspend_set was called");
267       Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
268       if(wrapper != null) {
269                                     
270          try {
271             ((Control)wrapper).SetSuspend( suspend);
272          } catch (Exception e) {
273             Eina.Log.Warning($"Callback error: {e.ToString()}");
274             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
275          }
276                         } else {
277          efl_control_suspend_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  suspend);
278       }
279    }
280    private static efl_control_suspend_set_delegate efl_control_suspend_set_static_delegate;
281 }
282