[EflSharp] Update Circle and efl cs files (#819)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / 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.Threading;
7 using System.ComponentModel;
8 namespace Efl {
9
10 namespace Gfx {
11
12 /// <summary>Efl Gfx Text Class interface</summary>
13 [Efl.Gfx.ITextClassConcrete.NativeMethods]
14 public interface ITextClass : 
15     Efl.Eo.IWrapper, IDisposable
16 {
17     /// <summary>Get font and font size from edje text class.
18 /// 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>
19 /// <param name="text_class">The text class name</param>
20 /// <param name="font">Font name</param>
21 /// <param name="size">Font Size</param>
22 /// <returns><c>true</c>, on success or <c>false</c>, on error</returns>
23 bool GetTextClass(System.String text_class, out System.String font, out Efl.Font.Size size);
24     /// <summary>Set Edje text class.
25 /// This function sets the text class for the Edje.</summary>
26 /// <param name="text_class">The text class name</param>
27 /// <param name="font">Font name</param>
28 /// <param name="size">Font Size</param>
29 /// <returns><c>true</c>, on success or <c>false</c>, on error</returns>
30 bool SetTextClass(System.String text_class, System.String font, Efl.Font.Size size);
31     /// <summary>Delete the text class.
32 /// This function deletes any values for the specified text class.
33 /// 
34 /// Deleting the text class will revert it to the values defined by <see cref="Efl.Gfx.ITextClass.GetTextClass"/> or the text class defined in the theme file.</summary>
35 /// <param name="text_class">The text class to be deleted.</param>
36 void DelTextClass(System.String text_class);
37             }
38 /// <summary>Efl Gfx Text Class interface</summary>
39 sealed public class ITextClassConcrete : 
40
41 ITextClass
42     
43 {
44     ///<summary>Pointer to the native class description.</summary>
45     public System.IntPtr NativeClass
46     {
47         get
48         {
49             if (((object)this).GetType() == typeof(ITextClassConcrete))
50             {
51                 return GetEflClassStatic();
52             }
53             else
54             {
55                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
56             }
57         }
58     }
59
60     private  System.IntPtr handle;
61     ///<summary>Pointer to the native instance.</summary>
62     public System.IntPtr NativeHandle
63     {
64         get { return handle; }
65     }
66
67     [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
68         efl_gfx_text_class_interface_get();
69     /// <summary>Initializes a new instance of the <see cref="ITextClass"/> class.
70     /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
71     private ITextClassConcrete(System.IntPtr raw)
72     {
73         handle = raw;
74     }
75     ///<summary>Destructor.</summary>
76     ~ITextClassConcrete()
77     {
78         Dispose(false);
79     }
80
81     ///<summary>Releases the underlying native instance.</summary>
82     private void Dispose(bool disposing)
83     {
84         if (handle != System.IntPtr.Zero)
85         {
86             IntPtr h = handle;
87             handle = IntPtr.Zero;
88
89             IntPtr gcHandlePtr = IntPtr.Zero;
90             if (disposing)
91             {
92                 Efl.Eo.Globals.efl_mono_native_dispose(h, gcHandlePtr);
93             }
94             else
95             {
96                 Monitor.Enter(Efl.All.InitLock);
97                 if (Efl.All.MainLoopInitialized)
98                 {
99                     Efl.Eo.Globals.efl_mono_thread_safe_native_dispose(h, gcHandlePtr);
100                 }
101
102                 Monitor.Exit(Efl.All.InitLock);
103             }
104         }
105
106     }
107
108     ///<summary>Releases the underlying native instance.</summary>
109     public void Dispose()
110     {
111         Dispose(true);
112         GC.SuppressFinalize(this);
113     }
114
115     /// <summary>Verifies if the given object is equal to this one.</summary>
116     /// <param name="instance">The object to compare to.</param>
117     /// <returns>True if both objects point to the same native object.</returns>
118     public override bool Equals(object instance)
119     {
120         var other = instance as Efl.Object;
121         if (other == null)
122         {
123             return false;
124         }
125         return this.NativeHandle == other.NativeHandle;
126     }
127
128     /// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>
129     /// <returns>The value of the pointer, to be used as the hash code of this object.</returns>
130     public override int GetHashCode()
131     {
132         return this.NativeHandle.ToInt32();
133     }
134
135     /// <summary>Turns the native pointer into a string representation.</summary>
136     /// <returns>A string with the type and the native pointer for this object.</returns>
137     public override String ToString()
138     {
139         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
140     }
141
142     /// <summary>Get font and font size from edje text class.
143     /// 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>
144     /// <param name="text_class">The text class name</param>
145     /// <param name="font">Font name</param>
146     /// <param name="size">Font Size</param>
147     /// <returns><c>true</c>, on success or <c>false</c>, on error</returns>
148     public bool GetTextClass(System.String text_class, out System.String font, out Efl.Font.Size size) {
149                                                                                  var _ret_var = Efl.Gfx.ITextClassConcrete.NativeMethods.efl_gfx_text_class_get_ptr.Value.Delegate(this.NativeHandle,text_class, out font, out size);
150         Eina.Error.RaiseIfUnhandledException();
151                                                         return _ret_var;
152  }
153     /// <summary>Set Edje text class.
154     /// This function sets the text class for the Edje.</summary>
155     /// <param name="text_class">The text class name</param>
156     /// <param name="font">Font name</param>
157     /// <param name="size">Font Size</param>
158     /// <returns><c>true</c>, on success or <c>false</c>, on error</returns>
159     public bool SetTextClass(System.String text_class, System.String font, Efl.Font.Size size) {
160                                                                                  var _ret_var = Efl.Gfx.ITextClassConcrete.NativeMethods.efl_gfx_text_class_set_ptr.Value.Delegate(this.NativeHandle,text_class, font, size);
161         Eina.Error.RaiseIfUnhandledException();
162                                                         return _ret_var;
163  }
164     /// <summary>Delete the text class.
165     /// This function deletes any values for the specified text class.
166     /// 
167     /// Deleting the text class will revert it to the values defined by <see cref="Efl.Gfx.ITextClass.GetTextClass"/> or the text class defined in the theme file.</summary>
168     /// <param name="text_class">The text class to be deleted.</param>
169     public void DelTextClass(System.String text_class) {
170                                  Efl.Gfx.ITextClassConcrete.NativeMethods.efl_gfx_text_class_del_ptr.Value.Delegate(this.NativeHandle,text_class);
171         Eina.Error.RaiseIfUnhandledException();
172                          }
173     private static IntPtr GetEflClassStatic()
174     {
175         return Efl.Gfx.ITextClassConcrete.efl_gfx_text_class_interface_get();
176     }
177     /// <summary>Wrapper for native methods and virtual method delegates.
178     /// For internal use by generated code only.</summary>
179     public class NativeMethods  : Efl.Eo.NativeClass
180     {
181         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Efl);
182         /// <summary>Gets the list of Eo operations to override.</summary>
183         /// <returns>The list of Eo operations to be overload.</returns>
184         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
185         {
186             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
187             var methods = Efl.Eo.Globals.GetUserMethods(type);
188
189             if (efl_gfx_text_class_get_static_delegate == null)
190             {
191                 efl_gfx_text_class_get_static_delegate = new efl_gfx_text_class_get_delegate(text_class_get);
192             }
193
194             if (methods.FirstOrDefault(m => m.Name == "GetTextClass") != null)
195             {
196                 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) });
197             }
198
199             if (efl_gfx_text_class_set_static_delegate == null)
200             {
201                 efl_gfx_text_class_set_static_delegate = new efl_gfx_text_class_set_delegate(text_class_set);
202             }
203
204             if (methods.FirstOrDefault(m => m.Name == "SetTextClass") != null)
205             {
206                 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) });
207             }
208
209             if (efl_gfx_text_class_del_static_delegate == null)
210             {
211                 efl_gfx_text_class_del_static_delegate = new efl_gfx_text_class_del_delegate(text_class_del);
212             }
213
214             if (methods.FirstOrDefault(m => m.Name == "DelTextClass") != null)
215             {
216                 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) });
217             }
218
219             return descs;
220         }
221         /// <summary>Returns the Eo class for the native methods of this class.</summary>
222         /// <returns>The native class pointer.</returns>
223         public override IntPtr GetEflClass()
224         {
225             return Efl.Gfx.ITextClassConcrete.efl_gfx_text_class_interface_get();
226         }
227
228         #pragma warning disable CA1707, SA1300, SA1600
229
230         [return: MarshalAs(UnmanagedType.U1)]
231         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);
232
233         [return: MarshalAs(UnmanagedType.U1)]
234         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);
235
236         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");
237
238         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)
239         {
240             Eina.Log.Debug("function efl_gfx_text_class_get was called");
241             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
242             if (wrapper != null)
243             {
244                                         System.String _out_font = default(System.String);
245         size = default(Efl.Font.Size);                                    bool _ret_var = default(bool);
246                 try
247                 {
248                     _ret_var = ((ITextClass)wrapper).GetTextClass(text_class, out _out_font, out size);
249                 }
250                 catch (Exception e)
251                 {
252                     Eina.Log.Warning($"Callback error: {e.ToString()}");
253                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
254                 }
255
256                 font = _out_font;
257                                         return _ret_var;
258
259             }
260             else
261             {
262                 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);
263             }
264         }
265
266         private static efl_gfx_text_class_get_delegate efl_gfx_text_class_get_static_delegate;
267
268         [return: MarshalAs(UnmanagedType.U1)]
269         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);
270
271         [return: MarshalAs(UnmanagedType.U1)]
272         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);
273
274         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");
275
276         private static bool text_class_set(System.IntPtr obj, System.IntPtr pd, System.String text_class, System.String font, Efl.Font.Size size)
277         {
278             Eina.Log.Debug("function efl_gfx_text_class_set was called");
279             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
280             if (wrapper != null)
281             {
282                                                                                     bool _ret_var = default(bool);
283                 try
284                 {
285                     _ret_var = ((ITextClass)wrapper).SetTextClass(text_class, font, size);
286                 }
287                 catch (Exception e)
288                 {
289                     Eina.Log.Warning($"Callback error: {e.ToString()}");
290                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
291                 }
292
293                                                         return _ret_var;
294
295             }
296             else
297             {
298                 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);
299             }
300         }
301
302         private static efl_gfx_text_class_set_delegate efl_gfx_text_class_set_static_delegate;
303
304         
305         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);
306
307         
308         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);
309
310         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");
311
312         private static void text_class_del(System.IntPtr obj, System.IntPtr pd, System.String text_class)
313         {
314             Eina.Log.Debug("function efl_gfx_text_class_del was called");
315             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
316             if (wrapper != null)
317             {
318                                     
319                 try
320                 {
321                     ((ITextClass)wrapper).DelTextClass(text_class);
322                 }
323                 catch (Exception e)
324                 {
325                     Eina.Log.Warning($"Callback error: {e.ToString()}");
326                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
327                 }
328
329                         
330             }
331             else
332             {
333                 efl_gfx_text_class_del_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), text_class);
334             }
335         }
336
337         private static efl_gfx_text_class_del_delegate efl_gfx_text_class_del_static_delegate;
338
339         #pragma warning restore CA1707, SA1300, SA1600
340
341 }
342 }
343 }
344
345 }
346