[EflSharp] Introduce EflSharp project (#749)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl_gfx_text_class.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 Gfx { 
8 /// <summary>Efl Gfx Text Class interface</summary>
9 [TextClassNativeInherit]
10 public interface TextClass : 
11    Efl.Eo.IWrapper, IDisposable
12 {
13    /// <summary>Get font and font size from edje text class.
14 /// This function gets the font and the font size from text class. The font string will only be valid until the text class is changed or the edje object is deleted.</summary>
15 /// <param name="text_class">The text class name</param>
16 /// <param name="font">Font name</param>
17 /// <param name="size">Font Size</param>
18 /// <returns><c>true</c>, on success or <c>false</c>, on error</returns>
19 bool GetTextClass(  System.String text_class,  out  System.String font,  out Efl.Font.Size size);
20    /// <summary>Set Edje text class.
21 /// This function sets the text class for the Edje.</summary>
22 /// <param name="text_class">The text class name</param>
23 /// <param name="font">Font name</param>
24 /// <param name="size">Font Size</param>
25 /// <returns><c>true</c>, on success or <c>false</c>, on error</returns>
26 bool SetTextClass(  System.String text_class,   System.String font,  Efl.Font.Size size);
27    /// <summary>Delete the text class.
28 /// This function deletes any values for the specified text class.
29 /// 
30 /// Deleting the text class will revert it to the values defined by <see cref="Efl.Gfx.TextClass.GetTextClass"/> or the text class defined in the theme file.
31 /// 1.17</summary>
32 /// <param name="text_class">The text class to be deleted.</param>
33 /// <returns></returns>
34  void DelTextClass(  System.String text_class);
35          }
36 /// <summary>Efl Gfx Text Class interface</summary>
37 sealed public class TextClassConcrete : 
38
39 TextClass
40    
41 {
42    ///<summary>Pointer to the native class description.</summary>
43    public System.IntPtr NativeClass {
44       get {
45          if (((object)this).GetType() == typeof (TextClassConcrete))
46             return Efl.Gfx.TextClassNativeInherit.GetEflClassStatic();
47          else
48             return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
49       }
50    }
51    private  System.IntPtr handle;
52    ///<summary>Pointer to the native instance.</summary>
53    public System.IntPtr NativeHandle {
54       get { return handle; }
55    }
56    [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
57       efl_gfx_text_class_interface_get();
58    ///<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>
59    public TextClassConcrete(System.IntPtr raw)
60    {
61       handle = raw;
62       register_event_proxies();
63    }
64    ///<summary>Destructor.</summary>
65    ~TextClassConcrete()
66    {
67       Dispose(false);
68    }
69    ///<summary>Releases the underlying native instance.</summary>
70    void Dispose(bool disposing)
71    {
72       if (handle != System.IntPtr.Zero) {
73          Efl.Eo.Globals.efl_unref(handle);
74          handle = System.IntPtr.Zero;
75       }
76    }
77    ///<summary>Releases the underlying native instance.</summary>
78    public void Dispose()
79    {
80       Dispose(true);
81       GC.SuppressFinalize(this);
82    }
83    ///<summary>Casts obj into an instance of this type.</summary>
84    public static TextClassConcrete static_cast(Efl.Object obj)
85    {
86       if (obj == null)
87          throw new System.ArgumentNullException("obj");
88       return new TextClassConcrete(obj.NativeHandle);
89    }
90    ///<summary>Verifies if the given object is equal to this one.</summary>
91    public override bool Equals(object obj)
92    {
93       var other = obj as Efl.Object;
94       if (other == null)
95          return false;
96       return this.NativeHandle == other.NativeHandle;
97    }
98    ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
99    public override int GetHashCode()
100    {
101       return this.NativeHandle.ToInt32();
102    }
103    ///<summary>Turns the native pointer into a string representation.</summary>
104    public override String ToString()
105    {
106       return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
107    }
108     void register_event_proxies()
109    {
110    }
111    /// <summary>Get font and font size from edje text class.
112    /// This function gets the font and the font size from text class. The font string will only be valid until the text class is changed or the edje object is deleted.</summary>
113    /// <param name="text_class">The text class name</param>
114    /// <param name="font">Font name</param>
115    /// <param name="size">Font Size</param>
116    /// <returns><c>true</c>, on success or <c>false</c>, on error</returns>
117    public bool GetTextClass(  System.String text_class,  out  System.String font,  out Efl.Font.Size size) {
118                                                              var _ret_var = Efl.Gfx.TextClassNativeInherit.efl_gfx_text_class_get_ptr.Value.Delegate(this.NativeHandle, text_class,  out font,  out size);
119       Eina.Error.RaiseIfUnhandledException();
120                                           return _ret_var;
121  }
122    /// <summary>Set Edje text class.
123    /// This function sets the text class for the Edje.</summary>
124    /// <param name="text_class">The text class name</param>
125    /// <param name="font">Font name</param>
126    /// <param name="size">Font Size</param>
127    /// <returns><c>true</c>, on success or <c>false</c>, on error</returns>
128    public bool SetTextClass(  System.String text_class,   System.String font,  Efl.Font.Size size) {
129                                                              var _ret_var = Efl.Gfx.TextClassNativeInherit.efl_gfx_text_class_set_ptr.Value.Delegate(this.NativeHandle, text_class,  font,  size);
130       Eina.Error.RaiseIfUnhandledException();
131                                           return _ret_var;
132  }
133    /// <summary>Delete the text class.
134    /// This function deletes any values for the specified text class.
135    /// 
136    /// Deleting the text class will revert it to the values defined by <see cref="Efl.Gfx.TextClass.GetTextClass"/> or the text class defined in the theme file.
137    /// 1.17</summary>
138    /// <param name="text_class">The text class to be deleted.</param>
139    /// <returns></returns>
140    public  void DelTextClass(  System.String text_class) {
141                          Efl.Gfx.TextClassNativeInherit.efl_gfx_text_class_del_ptr.Value.Delegate(this.NativeHandle, text_class);
142       Eina.Error.RaiseIfUnhandledException();
143                    }
144 }
145 public class TextClassNativeInherit  : Efl.Eo.NativeClass{
146    public  static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Efl);
147    public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
148    {
149       var descs = new System.Collections.Generic.List<Efl_Op_Description>();
150       if (efl_gfx_text_class_get_static_delegate == null)
151       efl_gfx_text_class_get_static_delegate = new efl_gfx_text_class_get_delegate(text_class_get);
152       descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_gfx_text_class_get"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_text_class_get_static_delegate)});
153       if (efl_gfx_text_class_set_static_delegate == null)
154       efl_gfx_text_class_set_static_delegate = new efl_gfx_text_class_set_delegate(text_class_set);
155       descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_gfx_text_class_set"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_text_class_set_static_delegate)});
156       if (efl_gfx_text_class_del_static_delegate == null)
157       efl_gfx_text_class_del_static_delegate = new efl_gfx_text_class_del_delegate(text_class_del);
158       descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(_Module.Module, "efl_gfx_text_class_del"), func = Marshal.GetFunctionPointerForDelegate(efl_gfx_text_class_del_static_delegate)});
159       return descs;
160    }
161    public override IntPtr GetEflClass()
162    {
163       return Efl.Gfx.TextClassConcrete.efl_gfx_text_class_interface_get();
164    }
165    public static  IntPtr GetEflClassStatic()
166    {
167       return Efl.Gfx.TextClassConcrete.efl_gfx_text_class_interface_get();
168    }
169
170
171     [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_gfx_text_class_get_delegate(System.IntPtr obj, System.IntPtr pd,  [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]   System.String text_class,  [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]  out  System.String font,   out Efl.Font.Size size);
172
173
174     [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_gfx_text_class_get_api_delegate(System.IntPtr obj,  [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]   System.String text_class,  [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]  out  System.String font,   out Efl.Font.Size size);
175     public static Efl.Eo.FunctionWrapper<efl_gfx_text_class_get_api_delegate> efl_gfx_text_class_get_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_text_class_get_api_delegate>(_Module, "efl_gfx_text_class_get");
176     private static bool text_class_get(System.IntPtr obj, System.IntPtr pd,   System.String text_class,  out  System.String font,  out Efl.Font.Size size)
177    {
178       Eina.Log.Debug("function efl_gfx_text_class_get was called");
179       Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
180       if(wrapper != null) {
181                                         System.String _out_font = default( System.String);
182       size = default(Efl.Font.Size);                           bool _ret_var = default(bool);
183          try {
184             _ret_var = ((TextClass)wrapper).GetTextClass( text_class,  out _out_font,  out size);
185          } catch (Exception e) {
186             Eina.Log.Warning($"Callback error: {e.ToString()}");
187             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
188          }
189             font = _out_font;
190                               return _ret_var;
191       } else {
192          return efl_gfx_text_class_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  text_class,  out font,  out size);
193       }
194    }
195    private static efl_gfx_text_class_get_delegate efl_gfx_text_class_get_static_delegate;
196
197
198     [return: MarshalAs(UnmanagedType.U1)] private delegate bool efl_gfx_text_class_set_delegate(System.IntPtr obj, System.IntPtr pd,  [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]   System.String text_class,  [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]   System.String font,   Efl.Font.Size size);
199
200
201     [return: MarshalAs(UnmanagedType.U1)] public delegate bool efl_gfx_text_class_set_api_delegate(System.IntPtr obj,  [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]   System.String text_class,  [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]   System.String font,   Efl.Font.Size size);
202     public static Efl.Eo.FunctionWrapper<efl_gfx_text_class_set_api_delegate> efl_gfx_text_class_set_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_text_class_set_api_delegate>(_Module, "efl_gfx_text_class_set");
203     private static bool text_class_set(System.IntPtr obj, System.IntPtr pd,   System.String text_class,   System.String font,  Efl.Font.Size size)
204    {
205       Eina.Log.Debug("function efl_gfx_text_class_set was called");
206       Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
207       if(wrapper != null) {
208                                                                         bool _ret_var = default(bool);
209          try {
210             _ret_var = ((TextClass)wrapper).SetTextClass( text_class,  font,  size);
211          } catch (Exception e) {
212             Eina.Log.Warning($"Callback error: {e.ToString()}");
213             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
214          }
215                                           return _ret_var;
216       } else {
217          return efl_gfx_text_class_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  text_class,  font,  size);
218       }
219    }
220    private static efl_gfx_text_class_set_delegate efl_gfx_text_class_set_static_delegate;
221
222
223     private delegate  void efl_gfx_text_class_del_delegate(System.IntPtr obj, System.IntPtr pd,  [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]   System.String text_class);
224
225
226     public delegate  void efl_gfx_text_class_del_api_delegate(System.IntPtr obj,  [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]   System.String text_class);
227     public static Efl.Eo.FunctionWrapper<efl_gfx_text_class_del_api_delegate> efl_gfx_text_class_del_ptr = new Efl.Eo.FunctionWrapper<efl_gfx_text_class_del_api_delegate>(_Module, "efl_gfx_text_class_del");
228     private static  void text_class_del(System.IntPtr obj, System.IntPtr pd,   System.String text_class)
229    {
230       Eina.Log.Debug("function efl_gfx_text_class_del was called");
231       Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.data_get(pd);
232       if(wrapper != null) {
233                                     
234          try {
235             ((TextClass)wrapper).DelTextClass( text_class);
236          } catch (Exception e) {
237             Eina.Log.Warning($"Callback error: {e.ToString()}");
238             Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
239          }
240                         } else {
241          efl_gfx_text_class_del_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  text_class);
242       }
243    }
244    private static efl_gfx_text_class_del_delegate efl_gfx_text_class_del_static_delegate;
245 }
246 } }