1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.Threading;
7 using System.ComponentModel;
10 /// <summary>Markup data that populates the text object's style and format</summary>
11 [Efl.ITextMarkupConcrete.NativeMethods]
12 public interface ITextMarkup :
13 Efl.Eo.IWrapper, IDisposable
15 /// <summary>Markup property</summary>
16 /// <returns>The markup-text representation set to this text.</returns>
17 System.String GetMarkup();
18 /// <summary>Markup property</summary>
19 /// <param name="markup">The markup-text representation set to this text.</param>
20 void SetMarkup(System.String markup);
21 /// <summary>Markup property</summary>
22 /// <value>The markup-text representation set to this text.</value>
23 System.String Markup {
28 /// <summary>Markup data that populates the text object's style and format</summary>
29 sealed public class ITextMarkupConcrete :
34 ///<summary>Pointer to the native class description.</summary>
35 public override System.IntPtr NativeClass
39 if (((object)this).GetType() == typeof(ITextMarkupConcrete))
41 return GetEflClassStatic();
45 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
50 [System.Runtime.InteropServices.DllImport("libefl.so.1")] internal static extern System.IntPtr
51 efl_text_markup_interface_get();
52 /// <summary>Initializes a new instance of the <see cref="ITextMarkup"/> class.
53 /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
54 private ITextMarkupConcrete(System.IntPtr raw) : base(raw)
58 /// <summary>Markup property</summary>
59 /// <returns>The markup-text representation set to this text.</returns>
60 public System.String GetMarkup() {
61 var _ret_var = Efl.ITextMarkupConcrete.NativeMethods.efl_text_markup_get_ptr.Value.Delegate(this.NativeHandle);
62 Eina.Error.RaiseIfUnhandledException();
65 /// <summary>Markup property</summary>
66 /// <param name="markup">The markup-text representation set to this text.</param>
67 public void SetMarkup(System.String markup) {
68 Efl.ITextMarkupConcrete.NativeMethods.efl_text_markup_set_ptr.Value.Delegate(this.NativeHandle,markup);
69 Eina.Error.RaiseIfUnhandledException();
71 /// <summary>Markup property</summary>
72 /// <value>The markup-text representation set to this text.</value>
73 public System.String Markup {
74 get { return GetMarkup(); }
75 set { SetMarkup(value); }
77 private static IntPtr GetEflClassStatic()
79 return Efl.ITextMarkupConcrete.efl_text_markup_interface_get();
81 /// <summary>Wrapper for native methods and virtual method delegates.
82 /// For internal use by generated code only.</summary>
83 public class NativeMethods : Efl.Eo.NativeClass
85 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Efl);
86 /// <summary>Gets the list of Eo operations to override.</summary>
87 /// <returns>The list of Eo operations to be overload.</returns>
88 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
90 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
91 var methods = Efl.Eo.Globals.GetUserMethods(type);
93 if (efl_text_markup_get_static_delegate == null)
95 efl_text_markup_get_static_delegate = new efl_text_markup_get_delegate(markup_get);
98 if (methods.FirstOrDefault(m => m.Name == "GetMarkup") != null)
100 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) });
103 if (efl_text_markup_set_static_delegate == null)
105 efl_text_markup_set_static_delegate = new efl_text_markup_set_delegate(markup_set);
108 if (methods.FirstOrDefault(m => m.Name == "SetMarkup") != null)
110 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) });
115 /// <summary>Returns the Eo class for the native methods of this class.</summary>
116 /// <returns>The native class pointer.</returns>
117 public override IntPtr GetEflClass()
119 return Efl.ITextMarkupConcrete.efl_text_markup_interface_get();
122 #pragma warning disable CA1707, CS1591, SA1300, SA1600
124 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]
125 private delegate System.String efl_text_markup_get_delegate(System.IntPtr obj, System.IntPtr pd);
127 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]
128 public delegate System.String efl_text_markup_get_api_delegate(System.IntPtr obj);
130 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");
132 private static System.String markup_get(System.IntPtr obj, System.IntPtr pd)
134 Eina.Log.Debug("function efl_text_markup_get was called");
135 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
138 System.String _ret_var = default(System.String);
141 _ret_var = ((ITextMarkup)ws.Target).GetMarkup();
145 Eina.Log.Warning($"Callback error: {e.ToString()}");
146 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
154 return efl_text_markup_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
158 private static efl_text_markup_get_delegate efl_text_markup_get_static_delegate;
161 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);
164 public delegate void efl_text_markup_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String markup);
166 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");
168 private static void markup_set(System.IntPtr obj, System.IntPtr pd, System.String markup)
170 Eina.Log.Debug("function efl_text_markup_set was called");
171 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
177 ((ITextMarkup)ws.Target).SetMarkup(markup);
181 Eina.Log.Warning($"Callback error: {e.ToString()}");
182 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
189 efl_text_markup_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), markup);
193 private static efl_text_markup_set_delegate efl_text_markup_set_static_delegate;
195 #pragma warning restore CA1707, CS1591, SA1300, SA1600