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 [Efl.Eo.BindingEntity]
13 public interface ITextMarkup :
14 Efl.Eo.IWrapper, IDisposable
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 {
29 /// <summary>Markup data that populates the text object's style and format</summary>
30 sealed public class ITextMarkupConcrete :
35 ///<summary>Pointer to the native class description.</summary>
36 public override System.IntPtr NativeClass
40 if (((object)this).GetType() == typeof(ITextMarkupConcrete))
42 return GetEflClassStatic();
46 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
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)
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)
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();
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();
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); }
85 private static IntPtr GetEflClassStatic()
87 return Efl.ITextMarkupConcrete.efl_text_markup_interface_get();
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
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)
98 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
99 var methods = Efl.Eo.Globals.GetUserMethods(type);
101 if (efl_text_markup_get_static_delegate == null)
103 efl_text_markup_get_static_delegate = new efl_text_markup_get_delegate(markup_get);
106 if (methods.FirstOrDefault(m => m.Name == "GetMarkup") != null)
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) });
111 if (efl_text_markup_set_static_delegate == null)
113 efl_text_markup_set_static_delegate = new efl_text_markup_set_delegate(markup_set);
116 if (methods.FirstOrDefault(m => m.Name == "SetMarkup") != null)
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) });
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()
127 return Efl.ITextMarkupConcrete.efl_text_markup_interface_get();
130 #pragma warning disable CA1707, CS1591, SA1300, SA1600
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);
135 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))]
136 public delegate System.String efl_text_markup_get_api_delegate(System.IntPtr obj);
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");
140 private static System.String markup_get(System.IntPtr obj, System.IntPtr pd)
142 Eina.Log.Debug("function efl_text_markup_get was called");
143 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
146 System.String _ret_var = default(System.String);
149 _ret_var = ((ITextMarkup)ws.Target).GetMarkup();
153 Eina.Log.Warning($"Callback error: {e.ToString()}");
154 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
162 return efl_text_markup_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)));
166 private static efl_text_markup_get_delegate efl_text_markup_get_static_delegate;
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);
172 public delegate void efl_text_markup_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String markup);
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");
176 private static void markup_set(System.IntPtr obj, System.IntPtr pd, System.String markup)
178 Eina.Log.Debug("function efl_text_markup_set was called");
179 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
185 ((ITextMarkup)ws.Target).SetMarkup(markup);
189 Eina.Log.Warning($"Callback error: {e.ToString()}");
190 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
197 efl_text_markup_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), markup);
201 private static efl_text_markup_set_delegate efl_text_markup_set_static_delegate;
203 #pragma warning restore CA1707, CS1591, SA1300, SA1600