X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=internals%2Fsrc%2FEflSharp%2FEflSharp%2Fefl%2Fefl_text_markup.eo.cs;h=89baeb265f2c6469d0442627a93844af3eb322b4;hb=04e59dc939f2654e4525abdb21f65f0632c988e0;hp=66943e2a3e8a444a9b694b270201c716d72a5669;hpb=1b49f5436f8fe9b85446ae63a3383d1527fbc28a;p=platform%2Fcore%2Fcsapi%2Ftizenfx.git diff --git a/internals/src/EflSharp/EflSharp/efl/efl_text_markup.eo.cs b/internals/src/EflSharp/EflSharp/efl/efl_text_markup.eo.cs index 66943e2..89baeb2 100644 --- a/internals/src/EflSharp/EflSharp/efl/efl_text_markup.eo.cs +++ b/internals/src/EflSharp/EflSharp/efl/efl_text_markup.eo.cs @@ -3,10 +3,13 @@ using System; using System.Runtime.InteropServices; using System.Collections.Generic; using System.Linq; +using System.Threading; using System.ComponentModel; -namespace Efl { +namespace Efl { + /// Markup data that populates the text object's style and format -[ITextMarkupNativeInherit] +[Efl.ITextMarkupConcrete.NativeMethods] +[Efl.Eo.BindingEntity] public interface ITextMarkup : Efl.Eo.IWrapper, IDisposable { @@ -15,181 +18,191 @@ public interface ITextMarkup : System.String GetMarkup(); /// Markup property /// The markup-text representation set to this text. -/// -void SetMarkup( System.String markup); +void SetMarkup(System.String markup); /// Markup property -/// The markup-text representation set to this text. + /// The markup-text representation set to this text. System.String Markup { get ; set ; } } /// Markup data that populates the text object's style and format -sealed public class ITextMarkupConcrete : - -ITextMarkup +sealed public class ITextMarkupConcrete : + Efl.Eo.EoWrapper + , ITextMarkup { ///Pointer to the native class description. - public System.IntPtr NativeClass { - get { - if (((object)this).GetType() == typeof (ITextMarkupConcrete)) - return Efl.ITextMarkupNativeInherit.GetEflClassStatic(); + public override System.IntPtr NativeClass + { + get + { + if (((object)this).GetType() == typeof(ITextMarkupConcrete)) + { + return GetEflClassStatic(); + } else + { return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()]; + } } } - private System.IntPtr handle; - ///Pointer to the native instance. - public System.IntPtr NativeHandle { - get { return handle; } - } - [System.Runtime.InteropServices.DllImport(efl.Libs.Efl)] internal static extern System.IntPtr - efl_text_markup_interface_get(); - ///Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly. - private ITextMarkupConcrete(System.IntPtr raw) - { - handle = raw; - RegisterEventProxies(); - } - ///Destructor. - ~ITextMarkupConcrete() - { - Dispose(false); - } - ///Releases the underlying native instance. - void Dispose(bool disposing) - { - if (handle != System.IntPtr.Zero) { - Efl.Eo.Globals.efl_unref(handle); - handle = System.IntPtr.Zero; - } - } - ///Releases the underlying native instance. - public void Dispose() - { - Dispose(true); - GC.SuppressFinalize(this); - } - ///Verifies if the given object is equal to this one. - public override bool Equals(object obj) - { - var other = obj as Efl.Object; - if (other == null) - return false; - return this.NativeHandle == other.NativeHandle; - } - ///Gets the hash code for this object based on the native pointer it points to. - public override int GetHashCode() - { - return this.NativeHandle.ToInt32(); - } - ///Turns the native pointer into a string representation. - public override String ToString() + + /// Constructor to be used when objects are expected to be constructed from native code. + /// Tag struct storing the native handle of the object being constructed. + private ITextMarkupConcrete(ConstructingHandle ch) : base(ch) { - return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]"; } - ///Register the Eo event wrappers making the bridge to C# events. Internal usage only. - void RegisterEventProxies() + + [System.Runtime.InteropServices.DllImport("libefl.so.1")] internal static extern System.IntPtr + efl_text_markup_interface_get(); + /// Initializes a new instance of the class. + /// Internal usage: This is used when interacting with C code and should not be used directly. + /// The native pointer to be wrapped. + private ITextMarkupConcrete(Efl.Eo.Globals.WrappingHandle wh) : base(wh) { } + /// Markup property /// The markup-text representation set to this text. public System.String GetMarkup() { - var _ret_var = Efl.ITextMarkupNativeInherit.efl_text_markup_get_ptr.Value.Delegate(this.NativeHandle); + var _ret_var = Efl.ITextMarkupConcrete.NativeMethods.efl_text_markup_get_ptr.Value.Delegate(this.NativeHandle); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// Markup property /// The markup-text representation set to this text. - /// - public void SetMarkup( System.String markup) { - Efl.ITextMarkupNativeInherit.efl_text_markup_set_ptr.Value.Delegate(this.NativeHandle, markup); + public void SetMarkup(System.String markup) { + Efl.ITextMarkupConcrete.NativeMethods.efl_text_markup_set_ptr.Value.Delegate(this.NativeHandle,markup); Eina.Error.RaiseIfUnhandledException(); } /// Markup property -/// The markup-text representation set to this text. + /// The markup-text representation set to this text. public System.String Markup { get { return GetMarkup(); } - set { SetMarkup( value); } + set { SetMarkup(value); } } private static IntPtr GetEflClassStatic() { return Efl.ITextMarkupConcrete.efl_text_markup_interface_get(); } -} -public class ITextMarkupNativeInherit : Efl.Eo.NativeClass{ - public static Efl.Eo.NativeModule _Module = new Efl.Eo.NativeModule(efl.Libs.Efl); - public override System.Collections.Generic.List GetEoOps(System.Type type) - { - var descs = new System.Collections.Generic.List(); - var methods = Efl.Eo.Globals.GetUserMethods(type); - if (efl_text_markup_get_static_delegate == null) - efl_text_markup_get_static_delegate = new efl_text_markup_get_delegate(markup_get); - if (methods.FirstOrDefault(m => m.Name == "GetMarkup") != null) - 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)}); - if (efl_text_markup_set_static_delegate == null) - efl_text_markup_set_static_delegate = new efl_text_markup_set_delegate(markup_set); - if (methods.FirstOrDefault(m => m.Name == "SetMarkup") != null) - 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)}); - return descs; - } - public override IntPtr GetEflClass() + /// Wrapper for native methods and virtual method delegates. + /// For internal use by generated code only. + public new class NativeMethods : Efl.Eo.EoWrapper.NativeMethods { - return Efl.ITextMarkupConcrete.efl_text_markup_interface_get(); - } - public static IntPtr GetEflClassStatic() - { - return Efl.ITextMarkupConcrete.efl_text_markup_interface_get(); - } + private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Efl); + /// Gets the list of Eo operations to override. + /// The list of Eo operations to be overload. + public override System.Collections.Generic.List GetEoOps(System.Type type) + { + var descs = new System.Collections.Generic.List(); + var methods = Efl.Eo.Globals.GetUserMethods(type); + if (efl_text_markup_get_static_delegate == null) + { + efl_text_markup_get_static_delegate = new efl_text_markup_get_delegate(markup_get); + } - [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] private delegate System.String efl_text_markup_get_delegate(System.IntPtr obj, System.IntPtr pd); + if (methods.FirstOrDefault(m => m.Name == "GetMarkup") != null) + { + 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) }); + } + if (efl_text_markup_set_static_delegate == null) + { + efl_text_markup_set_static_delegate = new efl_text_markup_set_delegate(markup_set); + } - [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] public delegate System.String efl_text_markup_get_api_delegate(System.IntPtr obj); - public static Efl.Eo.FunctionWrapper efl_text_markup_get_ptr = new Efl.Eo.FunctionWrapper(_Module, "efl_text_markup_get"); - private static System.String markup_get(System.IntPtr obj, System.IntPtr pd) - { - Eina.Log.Debug("function efl_text_markup_get was called"); - Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd); - if(wrapper != null) { - System.String _ret_var = default(System.String); - try { - _ret_var = ((ITextMarkup)wrapper).GetMarkup(); - } catch (Exception e) { - Eina.Log.Warning($"Callback error: {e.ToString()}"); - Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); + if (methods.FirstOrDefault(m => m.Name == "SetMarkup") != null) + { + 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) }); } + + return descs; + } + /// Returns the Eo class for the native methods of this class. + /// The native class pointer. + public override IntPtr GetEflClass() + { + return Efl.ITextMarkupConcrete.efl_text_markup_interface_get(); + } + + #pragma warning disable CA1707, CS1591, SA1300, SA1600 + + [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] + private delegate System.String efl_text_markup_get_delegate(System.IntPtr obj, System.IntPtr pd); + + [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] + public delegate System.String efl_text_markup_get_api_delegate(System.IntPtr obj); + + public static Efl.Eo.FunctionWrapper efl_text_markup_get_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_text_markup_get"); + + private static System.String markup_get(System.IntPtr obj, System.IntPtr pd) + { + Eina.Log.Debug("function efl_text_markup_get was called"); + var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); + if (ws != null) + { + System.String _ret_var = default(System.String); + try + { + _ret_var = ((ITextMarkup)ws.Target).GetMarkup(); + } + catch (Exception e) + { + Eina.Log.Warning($"Callback error: {e.ToString()}"); + Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); + } + return _ret_var; - } else { - return efl_text_markup_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj))); + + } + else + { + return efl_text_markup_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj))); + } } - } - private static efl_text_markup_get_delegate efl_text_markup_get_static_delegate; + private static efl_text_markup_get_delegate efl_text_markup_get_static_delegate; - 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); + + 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); + + public delegate void efl_text_markup_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String markup); - public delegate void efl_text_markup_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String markup); - public static Efl.Eo.FunctionWrapper efl_text_markup_set_ptr = new Efl.Eo.FunctionWrapper(_Module, "efl_text_markup_set"); - private static void markup_set(System.IntPtr obj, System.IntPtr pd, System.String markup) - { - Eina.Log.Debug("function efl_text_markup_set was called"); - Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd); - if(wrapper != null) { - - try { - ((ITextMarkup)wrapper).SetMarkup( markup); - } catch (Exception e) { - Eina.Log.Warning($"Callback error: {e.ToString()}"); - Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); + public static Efl.Eo.FunctionWrapper efl_text_markup_set_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_text_markup_set"); + + private static void markup_set(System.IntPtr obj, System.IntPtr pd, System.String markup) + { + Eina.Log.Debug("function efl_text_markup_set was called"); + var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); + if (ws != null) + { + + try + { + ((ITextMarkup)ws.Target).SetMarkup(markup); + } + catch (Exception e) + { + Eina.Log.Warning($"Callback error: {e.ToString()}"); + Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); + } + + + } + else + { + efl_text_markup_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), markup); } - } else { - efl_text_markup_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), markup); } - } - private static efl_text_markup_set_delegate efl_text_markup_set_static_delegate; + + private static efl_text_markup_set_delegate efl_text_markup_set_static_delegate; + + #pragma warning restore CA1707, CS1591, SA1300, SA1600 + } -} +} +} +