[EflSharp] Separate efl and Circle cs files and Update cs files (#786)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_text_markup_util.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>Utility class for markup, such as conversions</summary>
9 [TextMarkupUtilNativeInherit]
10 public class TextMarkupUtil :  Efl.Eo.IWrapper, IDisposable
11 {
12     ///<summary>Pointer to the native class description.</summary>
13     public virtual System.IntPtr NativeClass {
14         get {
15             if (((object)this).GetType() == typeof (TextMarkupUtil))
16                 return Efl.TextMarkupUtilNativeInherit.GetEflClassStatic();
17             else
18                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
19         }
20     }
21     protected bool inherited;
22     protected  System.IntPtr handle;
23     ///<summary>Pointer to the native instance.</summary>
24     public System.IntPtr NativeHandle {
25         get { return handle; }
26     }
27     [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
28         efl_text_markup_util_class_get();
29     ///<summary>Creates a new instance.</summary>
30     ///<param name="parent">Parent instance.</param>
31     public TextMarkupUtil(Efl.Object parent= null
32             ) :
33         this(efl_text_markup_util_class_get(), typeof(TextMarkupUtil), parent)
34     {
35         FinishInstantiation();
36     }
37     ///<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>
38     protected TextMarkupUtil(System.IntPtr raw)
39     {
40         handle = raw;
41         RegisterEventProxies();
42     }
43     protected TextMarkupUtil(IntPtr base_klass, System.Type managed_type, Efl.Object parent)
44     {
45         inherited = ((object)this).GetType() != managed_type;
46         IntPtr actual_klass = base_klass;
47         if (inherited) {
48             actual_klass = Efl.Eo.ClassRegister.GetInheritKlassOrRegister(base_klass, ((object)this).GetType());
49         }
50         handle = Efl.Eo.Globals.instantiate_start(actual_klass, parent);
51         RegisterEventProxies();
52         if (inherited)
53         {
54             Efl.Eo.Globals.PrivateDataSet(this);
55         }
56     }
57     protected void FinishInstantiation()
58     {
59         handle = Efl.Eo.Globals.instantiate_end(handle);
60         Eina.Error.RaiseIfUnhandledException();
61     }
62     ///<summary>Destructor.</summary>
63     ~TextMarkupUtil()
64     {
65         Dispose(false);
66     }
67     ///<summary>Releases the underlying native instance.</summary>
68     protected virtual void Dispose(bool disposing)
69     {
70         if (handle != System.IntPtr.Zero) {
71             Efl.Eo.Globals.efl_unref(handle);
72             handle = System.IntPtr.Zero;
73         }
74     }
75     ///<summary>Releases the underlying native instance.</summary>
76     public void Dispose()
77     {
78         Dispose(true);
79         GC.SuppressFinalize(this);
80     }
81     ///<summary>Verifies if the given object is equal to this one.</summary>
82     public override bool Equals(object obj)
83     {
84         var other = obj as Efl.Object;
85         if (other == null)
86             return false;
87         return this.NativeHandle == other.NativeHandle;
88     }
89     ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
90     public override int GetHashCode()
91     {
92         return this.NativeHandle.ToInt32();
93     }
94     ///<summary>Turns the native pointer into a string representation.</summary>
95     public override String ToString()
96     {
97         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
98     }
99     ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
100     protected virtual void RegisterEventProxies()
101     {
102     }
103     /// <summary>Converts a given (UTF-8) text to a markup-compatible string. This is used mainly to set a plain text with the $.markup_set property.</summary>
104     /// <param name="text">The text (UTF-8) to convert to markup</param>
105     /// <returns>The markup representation of given text</returns>
106     public static System.String TextToMarkup( System.String text) {
107                                  var _ret_var = Efl.TextMarkupUtilNativeInherit.efl_text_markup_util_text_to_markup_ptr.Value.Delegate( text);
108         Eina.Error.RaiseIfUnhandledException();
109                         return _ret_var;
110  }
111     /// <summary>Converts a given (UTF-8) text to a markup-compatible string. This is used mainly to set a plain text with the $.markup_set property.</summary>
112     /// <param name="text">The markup-text to convert to text (UTF-8)</param>
113     /// <returns>The text representation of given format</returns>
114     public static System.String MarkupToText( System.String text) {
115                                  var _ret_var = Efl.TextMarkupUtilNativeInherit.efl_text_markup_util_markup_to_text_ptr.Value.Delegate( text);
116         Eina.Error.RaiseIfUnhandledException();
117                         return _ret_var;
118  }
119     private static IntPtr GetEflClassStatic()
120     {
121         return Efl.TextMarkupUtil.efl_text_markup_util_class_get();
122     }
123 }
124 public class TextMarkupUtilNativeInherit  : Efl.Eo.NativeClass{
125     public  static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Efl);
126     public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
127     {
128         var descs = new System.Collections.Generic.List<Efl_Op_Description>();
129         var methods = Efl.Eo.Globals.GetUserMethods(type);
130         return descs;
131     }
132     public override IntPtr GetEflClass()
133     {
134         return Efl.TextMarkupUtil.efl_text_markup_util_class_get();
135     }
136     public static  IntPtr GetEflClassStatic()
137     {
138         return Efl.TextMarkupUtil.efl_text_markup_util_class_get();
139     }
140
141
142      [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))] private delegate System.String efl_text_markup_util_text_to_markup_delegate( [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]  System.String text);
143
144
145      [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))] public delegate System.String efl_text_markup_util_text_to_markup_api_delegate( [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]  System.String text);
146      public static Efl.Eo.FunctionWrapper<efl_text_markup_util_text_to_markup_api_delegate> efl_text_markup_util_text_to_markup_ptr = new Efl.Eo.FunctionWrapper<efl_text_markup_util_text_to_markup_api_delegate>(_Module, "efl_text_markup_util_text_to_markup");
147      private static System.String text_to_markup(System.IntPtr obj, System.IntPtr pd,  System.String text)
148     {
149         Eina.Log.Debug("function efl_text_markup_util_text_to_markup was called");
150         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
151         if(wrapper != null) {
152                                                 System.String _ret_var = default(System.String);
153             try {
154                 _ret_var = TextMarkupUtil.TextToMarkup( text);
155             } catch (Exception e) {
156                 Eina.Log.Warning($"Callback error: {e.ToString()}");
157                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
158             }
159                         return _ret_var;
160         } else {
161             return efl_text_markup_util_text_to_markup_ptr.Value.Delegate( text);
162         }
163     }
164
165
166      [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))] private delegate System.String efl_text_markup_util_markup_to_text_delegate( [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]  System.String text);
167
168
169      [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))] public delegate System.String efl_text_markup_util_markup_to_text_api_delegate( [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]  System.String text);
170      public static Efl.Eo.FunctionWrapper<efl_text_markup_util_markup_to_text_api_delegate> efl_text_markup_util_markup_to_text_ptr = new Efl.Eo.FunctionWrapper<efl_text_markup_util_markup_to_text_api_delegate>(_Module, "efl_text_markup_util_markup_to_text");
171      private static System.String markup_to_text(System.IntPtr obj, System.IntPtr pd,  System.String text)
172     {
173         Eina.Log.Debug("function efl_text_markup_util_markup_to_text was called");
174         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
175         if(wrapper != null) {
176                                                 System.String _ret_var = default(System.String);
177             try {
178                 _ret_var = TextMarkupUtil.MarkupToText( text);
179             } catch (Exception e) {
180                 Eina.Log.Warning($"Callback error: {e.ToString()}");
181                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
182             }
183                         return _ret_var;
184         } else {
185             return efl_text_markup_util_markup_to_text_ptr.Value.Delegate( text);
186         }
187     }
188 }
189