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