66943e2a3e8a444a9b694b270201c716d72a5669
[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.ComponentModel;
7 namespace Efl { 
8 /// <summary>Markup data that populates the text object&apos;s style and format</summary>
9 [ITextMarkupNativeInherit]
10 public interface ITextMarkup : 
11     Efl.Eo.IWrapper, IDisposable
12 {
13     /// <summary>Markup property</summary>
14 /// <returns>The markup-text representation set to this text.</returns>
15 System.String GetMarkup();
16     /// <summary>Markup property</summary>
17 /// <param name="markup">The markup-text representation set to this text.</param>
18 /// <returns></returns>
19 void SetMarkup( System.String markup);
20             /// <summary>Markup property</summary>
21 /// <value>The markup-text representation set to this text.</value>
22     System.String Markup {
23         get ;
24         set ;
25     }
26 }
27 /// <summary>Markup data that populates the text object&apos;s style and format</summary>
28 sealed public class ITextMarkupConcrete : 
29
30 ITextMarkup
31     
32 {
33     ///<summary>Pointer to the native class description.</summary>
34     public System.IntPtr NativeClass {
35         get {
36             if (((object)this).GetType() == typeof (ITextMarkupConcrete))
37                 return Efl.ITextMarkupNativeInherit.GetEflClassStatic();
38             else
39                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
40         }
41     }
42     private  System.IntPtr handle;
43     ///<summary>Pointer to the native instance.</summary>
44     public System.IntPtr NativeHandle {
45         get { return handle; }
46     }
47     [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr
48         efl_text_markup_interface_get();
49     ///<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>
50     private ITextMarkupConcrete(System.IntPtr raw)
51     {
52         handle = raw;
53         RegisterEventProxies();
54     }
55     ///<summary>Destructor.</summary>
56     ~ITextMarkupConcrete()
57     {
58         Dispose(false);
59     }
60     ///<summary>Releases the underlying native instance.</summary>
61     void Dispose(bool disposing)
62     {
63         if (handle != System.IntPtr.Zero) {
64             Efl.Eo.Globals.efl_unref(handle);
65             handle = System.IntPtr.Zero;
66         }
67     }
68     ///<summary>Releases the underlying native instance.</summary>
69     public void Dispose()
70     {
71         Dispose(true);
72         GC.SuppressFinalize(this);
73     }
74     ///<summary>Verifies if the given object is equal to this one.</summary>
75     public override bool Equals(object obj)
76     {
77         var other = obj as Efl.Object;
78         if (other == null)
79             return false;
80         return this.NativeHandle == other.NativeHandle;
81     }
82     ///<summary>Gets the hash code for this object based on the native pointer it points to.</summary>
83     public override int GetHashCode()
84     {
85         return this.NativeHandle.ToInt32();
86     }
87     ///<summary>Turns the native pointer into a string representation.</summary>
88     public override String ToString()
89     {
90         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
91     }
92     ///<summary>Register the Eo event wrappers making the bridge to C# events. Internal usage only.</summary>
93      void RegisterEventProxies()
94     {
95     }
96     /// <summary>Markup property</summary>
97     /// <returns>The markup-text representation set to this text.</returns>
98     public System.String GetMarkup() {
99          var _ret_var = Efl.ITextMarkupNativeInherit.efl_text_markup_get_ptr.Value.Delegate(this.NativeHandle);
100         Eina.Error.RaiseIfUnhandledException();
101         return _ret_var;
102  }
103     /// <summary>Markup property</summary>
104     /// <param name="markup">The markup-text representation set to this text.</param>
105     /// <returns></returns>
106     public void SetMarkup( System.String markup) {
107                                  Efl.ITextMarkupNativeInherit.efl_text_markup_set_ptr.Value.Delegate(this.NativeHandle, markup);
108         Eina.Error.RaiseIfUnhandledException();
109                          }
110     /// <summary>Markup property</summary>
111 /// <value>The markup-text representation set to this text.</value>
112     public System.String Markup {
113         get { return GetMarkup(); }
114         set { SetMarkup( value); }
115     }
116     private static IntPtr GetEflClassStatic()
117     {
118         return Efl.ITextMarkupConcrete.efl_text_markup_interface_get();
119     }
120 }
121 public class ITextMarkupNativeInherit  : Efl.Eo.NativeClass{
122     public  static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Efl);
123     public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
124     {
125         var descs = new System.Collections.Generic.List<Efl_Op_Description>();
126         var methods = Efl.Eo.Globals.GetUserMethods(type);
127         if (efl_text_markup_get_static_delegate == null)
128             efl_text_markup_get_static_delegate = new efl_text_markup_get_delegate(markup_get);
129         if (methods.FirstOrDefault(m => m.Name == "GetMarkup") != null)
130             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)});
131         if (efl_text_markup_set_static_delegate == null)
132             efl_text_markup_set_static_delegate = new efl_text_markup_set_delegate(markup_set);
133         if (methods.FirstOrDefault(m => m.Name == "SetMarkup") != null)
134             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)});
135         return descs;
136     }
137     public override IntPtr GetEflClass()
138     {
139         return Efl.ITextMarkupConcrete.efl_text_markup_interface_get();
140     }
141     public static  IntPtr GetEflClassStatic()
142     {
143         return Efl.ITextMarkupConcrete.efl_text_markup_interface_get();
144     }
145
146
147      [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] private delegate System.String efl_text_markup_get_delegate(System.IntPtr obj, System.IntPtr pd);
148
149
150      [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] public delegate System.String efl_text_markup_get_api_delegate(System.IntPtr obj);
151      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");
152      private static System.String markup_get(System.IntPtr obj, System.IntPtr pd)
153     {
154         Eina.Log.Debug("function efl_text_markup_get was called");
155         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
156         if(wrapper != null) {
157                         System.String _ret_var = default(System.String);
158             try {
159                 _ret_var = ((ITextMarkup)wrapper).GetMarkup();
160             } catch (Exception e) {
161                 Eina.Log.Warning($"Callback error: {e.ToString()}");
162                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
163             }
164         return _ret_var;
165         } else {
166             return efl_text_markup_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
167         }
168     }
169     private static efl_text_markup_get_delegate efl_text_markup_get_static_delegate;
170
171
172      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);
173
174
175      public delegate void efl_text_markup_set_api_delegate(System.IntPtr obj,  [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]  System.String markup);
176      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");
177      private static void markup_set(System.IntPtr obj, System.IntPtr pd,  System.String markup)
178     {
179         Eina.Log.Debug("function efl_text_markup_set was called");
180         Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
181         if(wrapper != null) {
182                                                 
183             try {
184                 ((ITextMarkup)wrapper).SetMarkup( markup);
185             } catch (Exception e) {
186                 Eina.Log.Warning($"Callback error: {e.ToString()}");
187                 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
188             }
189                                 } else {
190             efl_text_markup_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)),  markup);
191         }
192     }
193     private static efl_text_markup_set_delegate efl_text_markup_set_static_delegate;
194 }
195