89baeb265f2c6469d0442627a93844af3eb322b4
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_text_markup.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 /// <summary>Markup data that populates the text object&apos;s style and format</summary>
11 [Efl.ITextMarkupConcrete.NativeMethods]
12 [Efl.Eo.BindingEntity]
13 public interface ITextMarkup : 
14     Efl.Eo.IWrapper, IDisposable
15 {
16     /// <summary>Markup property</summary>
17 /// <returns>The markup-text representation set to this text.</returns>
18 System.String GetMarkup();
19     /// <summary>Markup property</summary>
20 /// <param name="markup">The markup-text representation set to this text.</param>
21 void SetMarkup(System.String markup);
22             /// <summary>Markup property</summary>
23     /// <value>The markup-text representation set to this text.</value>
24     System.String Markup {
25         get ;
26         set ;
27     }
28 }
29 /// <summary>Markup data that populates the text object&apos;s style and format</summary>
30 sealed public class ITextMarkupConcrete :
31     Efl.Eo.EoWrapper
32     , ITextMarkup
33     
34 {
35     ///<summary>Pointer to the native class description.</summary>
36     public override System.IntPtr NativeClass
37     {
38         get
39         {
40             if (((object)this).GetType() == typeof(ITextMarkupConcrete))
41             {
42                 return GetEflClassStatic();
43             }
44             else
45             {
46                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
47             }
48         }
49     }
50
51     /// <summary>Constructor to be used when objects are expected to be constructed from native code.</summary>
52     /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
53     private ITextMarkupConcrete(ConstructingHandle ch) : base(ch)
54     {
55     }
56
57     [System.Runtime.InteropServices.DllImport("libefl.so.1")] internal static extern System.IntPtr
58         efl_text_markup_interface_get();
59     /// <summary>Initializes a new instance of the <see cref="ITextMarkup"/> class.
60     /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
61     /// <param name="wh">The native pointer to be wrapped.</param>
62     private ITextMarkupConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
63     {
64     }
65
66     /// <summary>Markup property</summary>
67     /// <returns>The markup-text representation set to this text.</returns>
68     public System.String GetMarkup() {
69          var _ret_var = Efl.ITextMarkupConcrete.NativeMethods.efl_text_markup_get_ptr.Value.Delegate(this.NativeHandle);
70         Eina.Error.RaiseIfUnhandledException();
71         return _ret_var;
72  }
73     /// <summary>Markup property</summary>
74     /// <param name="markup">The markup-text representation set to this text.</param>
75     public void SetMarkup(System.String markup) {
76                                  Efl.ITextMarkupConcrete.NativeMethods.efl_text_markup_set_ptr.Value.Delegate(this.NativeHandle,markup);
77         Eina.Error.RaiseIfUnhandledException();
78                          }
79     /// <summary>Markup property</summary>
80     /// <value>The markup-text representation set to this text.</value>
81     public System.String Markup {
82         get { return GetMarkup(); }
83         set { SetMarkup(value); }
84     }
85     private static IntPtr GetEflClassStatic()
86     {
87         return Efl.ITextMarkupConcrete.efl_text_markup_interface_get();
88     }
89     /// <summary>Wrapper for native methods and virtual method delegates.
90     /// For internal use by generated code only.</summary>
91     public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods
92     {
93         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Efl);
94         /// <summary>Gets the list of Eo operations to override.</summary>
95         /// <returns>The list of Eo operations to be overload.</returns>
96         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
97         {
98             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
99             var methods = Efl.Eo.Globals.GetUserMethods(type);
100
101             if (efl_text_markup_get_static_delegate == null)
102             {
103                 efl_text_markup_get_static_delegate = new efl_text_markup_get_delegate(markup_get);
104             }
105
106             if (methods.FirstOrDefault(m => m.Name == "GetMarkup") != null)
107             {
108                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_text_markup_get"), func = Marshal.GetFunctionPointerForDelegate(efl_text_markup_get_static_delegate) });
109             }
110
111             if (efl_text_markup_set_static_delegate == null)
112             {
113                 efl_text_markup_set_static_delegate = new efl_text_markup_set_delegate(markup_set);
114             }
115
116             if (methods.FirstOrDefault(m => m.Name == "SetMarkup") != null)
117             {
118                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_text_markup_set"), func = Marshal.GetFunctionPointerForDelegate(efl_text_markup_set_static_delegate) });
119             }
120
121             return descs;
122         }
123         /// <summary>Returns the Eo class for the native methods of this class.</summary>
124         /// <returns>The native class pointer.</returns>
125         public override IntPtr GetEflClass()
126         {
127             return Efl.ITextMarkupConcrete.efl_text_markup_interface_get();
128         }
129
130         #pragma warning disable CA1707, CS1591, SA1300, SA1600
131
132         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]
133         private delegate System.String efl_text_markup_get_delegate(System.IntPtr obj, System.IntPtr pd);
134
135         [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]
136         public delegate System.String efl_text_markup_get_api_delegate(System.IntPtr obj);
137
138         public static Efl.Eo.FunctionWrapper<efl_text_markup_get_api_delegate> efl_text_markup_get_ptr = new Efl.Eo.FunctionWrapper<efl_text_markup_get_api_delegate>(Module, "efl_text_markup_get");
139
140         private static System.String markup_get(System.IntPtr obj, System.IntPtr pd)
141         {
142             Eina.Log.Debug("function efl_text_markup_get was called");
143             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
144             if (ws != null)
145             {
146             System.String _ret_var = default(System.String);
147                 try
148                 {
149                     _ret_var = ((ITextMarkup)ws.Target).GetMarkup();
150                 }
151                 catch (Exception e)
152                 {
153                     Eina.Log.Warning($"Callback error: {e.ToString()}");
154                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
155                 }
156
157         return _ret_var;
158
159             }
160             else
161             {
162                 return efl_text_markup_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
163             }
164         }
165
166         private static efl_text_markup_get_delegate efl_text_markup_get_static_delegate;
167
168         
169         private delegate void efl_text_markup_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String markup);
170
171         
172         public delegate void efl_text_markup_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String markup);
173
174         public static Efl.Eo.FunctionWrapper<efl_text_markup_set_api_delegate> efl_text_markup_set_ptr = new Efl.Eo.FunctionWrapper<efl_text_markup_set_api_delegate>(Module, "efl_text_markup_set");
175
176         private static void markup_set(System.IntPtr obj, System.IntPtr pd, System.String markup)
177         {
178             Eina.Log.Debug("function efl_text_markup_set was called");
179             var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
180             if (ws != null)
181             {
182                                     
183                 try
184                 {
185                     ((ITextMarkup)ws.Target).SetMarkup(markup);
186                 }
187                 catch (Exception e)
188                 {
189                     Eina.Log.Warning($"Callback error: {e.ToString()}");
190                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
191                 }
192
193                         
194             }
195             else
196             {
197                 efl_text_markup_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), markup);
198             }
199         }
200
201         private static efl_text_markup_set_delegate efl_text_markup_set_static_delegate;
202
203         #pragma warning restore CA1707, CS1591, SA1300, SA1600
204
205 }
206 }
207 }
208