[NUI] TCSACR-226 code change (#1032)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_text_markup_util.eo.cs
1 #define EFL_BETA
2 #pragma warning disable CS1591
3 using System;
4 using System.Runtime.InteropServices;
5 using System.Collections.Generic;
6 using System.Linq;
7 using System.Threading;
8 using System.ComponentModel;
9 namespace Efl {
10
11 /// <summary>Utility class for markup, such as conversions</summary>
12 /// <remarks>This is a <b>BETA</b> class. It can be modified or removed in the future. Do not use it for product development.</remarks>
13 [Efl.TextMarkupUtil.NativeMethods]
14 [Efl.Eo.BindingEntity]
15 public class TextMarkupUtil : Efl.Eo.EoWrapper
16 {
17     /// <summary>Pointer to the native class description.</summary>
18     public override System.IntPtr NativeClass
19     {
20         get
21         {
22             if (((object)this).GetType() == typeof(TextMarkupUtil))
23             {
24                 return GetEflClassStatic();
25             }
26             else
27             {
28                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
29             }
30         }
31     }
32
33     [System.Runtime.InteropServices.DllImport("libefl.so.1")] internal static extern System.IntPtr
34         efl_text_markup_util_class_get();
35     /// <summary>Initializes a new instance of the <see cref="TextMarkupUtil"/> class.</summary>
36     /// <param name="parent">Parent instance.</param>
37     public TextMarkupUtil(Efl.Object parent= null
38             ) : base(efl_text_markup_util_class_get(), parent)
39     {
40         FinishInstantiation();
41     }
42
43     /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
44     /// Do not call this constructor directly.</summary>
45     /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
46     protected TextMarkupUtil(ConstructingHandle ch) : base(ch)
47     {
48     }
49
50     /// <summary>Initializes a new instance of the <see cref="TextMarkupUtil"/> class.
51     /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
52     /// <param name="wh">The native pointer to be wrapped.</param>
53     protected TextMarkupUtil(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
54     {
55     }
56
57     /// <summary>Initializes a new instance of the <see cref="TextMarkupUtil"/> class.
58     /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
59     /// <param name="baseKlass">The pointer to the base native Eo class.</param>
60     /// <param name="parent">The Efl.Object parent of this instance.</param>
61     protected TextMarkupUtil(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent)
62     {
63     }
64
65     /// <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>
66     /// <param name="text">The text (UTF-8) to convert to markup</param>
67     /// <returns>The markup representation of given text</returns>
68     public static System.String TextToMarkup(System.String text) {
69                                  var _ret_var = Efl.TextMarkupUtil.NativeMethods.efl_text_markup_util_text_to_markup_ptr.Value.Delegate(text);
70         Eina.Error.RaiseIfUnhandledException();
71                         return _ret_var;
72  }
73     /// <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>
74     /// <param name="text">The markup-text to convert to text (UTF-8)</param>
75     /// <returns>The text representation of given format</returns>
76     public static System.String MarkupToText(System.String text) {
77                                  var _ret_var = Efl.TextMarkupUtil.NativeMethods.efl_text_markup_util_markup_to_text_ptr.Value.Delegate(text);
78         Eina.Error.RaiseIfUnhandledException();
79                         return _ret_var;
80  }
81     private static IntPtr GetEflClassStatic()
82     {
83         return Efl.TextMarkupUtil.efl_text_markup_util_class_get();
84     }
85     /// <summary>Wrapper for native methods and virtual method delegates.
86     /// For internal use by generated code only.</summary>
87     public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
88     {
89         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Efl);
90         /// <summary>Gets the list of Eo operations to override.</summary>
91         /// <returns>The list of Eo operations to be overload.</returns>
92         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
93         {
94             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
95             descs.AddRange(base.GetEoOps(type));
96             return descs;
97         }
98         /// <summary>Returns the Eo class for the native methods of this class.</summary>
99         /// <returns>The native class pointer.</returns>
100         public override IntPtr GetEflClass()
101         {
102             return Efl.TextMarkupUtil.efl_text_markup_util_class_get();
103         }
104
105         #pragma warning disable CA1707, CS1591, SA1300, SA1600
106
107         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]
108         private delegate System.String efl_text_markup_util_text_to_markup_delegate([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String text);
109
110         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]
111         public delegate System.String efl_text_markup_util_text_to_markup_api_delegate([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String text);
112
113         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");
114
115         private static System.String text_to_markup(System.IntPtr obj, System.IntPtr pd, System.String text)
116         {
117             Eina.Log.Debug("function efl_text_markup_util_text_to_markup was called");
118             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
119             if (ws != null)
120             {
121                                     System.String _ret_var = default(System.String);
122                 try
123                 {
124                     _ret_var = TextMarkupUtil.TextToMarkup(text);
125                 }
126                 catch (Exception e)
127                 {
128                     Eina.Log.Warning($"Callback error: {e.ToString()}");
129                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
130                 }
131
132                         return _ret_var;
133
134             }
135             else
136             {
137                 return efl_text_markup_util_text_to_markup_ptr.Value.Delegate(text);
138             }
139         }
140
141         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]
142         private delegate System.String efl_text_markup_util_markup_to_text_delegate([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String text);
143
144         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringPassOwnershipMarshaler))]
145         public delegate System.String efl_text_markup_util_markup_to_text_api_delegate([MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String text);
146
147         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");
148
149         private static System.String markup_to_text(System.IntPtr obj, System.IntPtr pd, System.String text)
150         {
151             Eina.Log.Debug("function efl_text_markup_util_markup_to_text was called");
152             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
153             if (ws != null)
154             {
155                                     System.String _ret_var = default(System.String);
156                 try
157                 {
158                     _ret_var = TextMarkupUtil.MarkupToText(text);
159                 }
160                 catch (Exception e)
161                 {
162                     Eina.Log.Warning($"Callback error: {e.ToString()}");
163                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
164                 }
165
166                         return _ret_var;
167
168             }
169             else
170             {
171                 return efl_text_markup_util_markup_to_text_ptr.Value.Delegate(text);
172             }
173         }
174
175         #pragma warning restore CA1707, CS1591, SA1300, SA1600
176
177 }
178 }
179 }
180
181 #if EFL_BETA
182 #pragma warning disable CS1591
183 public static class EflTextMarkupUtil_ExtensionMethods {
184 }
185 #pragma warning restore CS1591
186 #endif