#pragma warning disable CS1591 using System; using System.Runtime.InteropServices; using System.Collections.Generic; using System.Linq; using System.Threading; using System.ComponentModel; namespace Efl { namespace Ui { /// Item internal text part class [Efl.Ui.ItemPartText.NativeMethods] [Efl.Eo.BindingEntity] public class ItemPartText : Efl.Ui.LayoutPart, Efl.IText, Efl.ITextMarkup, Efl.Ui.IL10n { ///Pointer to the native class description. public override System.IntPtr NativeClass { get { if (((object)this).GetType() == typeof(ItemPartText)) { return GetEflClassStatic(); } else { return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()]; } } } [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr efl_ui_item_part_text_class_get(); /// Initializes a new instance of the class. /// Parent instance. public ItemPartText(Efl.Object parent= null ) : base(efl_ui_item_part_text_class_get(), parent) { FinishInstantiation(); } /// 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. protected ItemPartText(ConstructingHandle ch) : base(ch) { } /// Initializes a new instance of the class. /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly. /// The native pointer to be wrapped. protected ItemPartText(Efl.Eo.Globals.WrappingHandle wh) : base(wh) { } /// Initializes a new instance of the class. /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly. /// The pointer to the base native Eo class. /// The Efl.Object parent of this instance. protected ItemPartText(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent) { } /// Retrieves the text string currently being displayed by the given text object. /// Do not free() the return value. /// /// See also . /// (Since EFL 1.22) /// Text string to display on it. virtual public System.String GetText() { var _ret_var = Efl.ITextConcrete.NativeMethods.efl_text_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass))); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// Sets the text string to be displayed by the given text object. /// See also . /// (Since EFL 1.22) /// Text string to display on it. virtual public void SetText(System.String text) { Efl.ITextConcrete.NativeMethods.efl_text_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),text); Eina.Error.RaiseIfUnhandledException(); } /// Markup property /// The markup-text representation set to this text. virtual public System.String GetMarkup() { var _ret_var = Efl.ITextMarkupConcrete.NativeMethods.efl_text_markup_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass))); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// Markup property /// The markup-text representation set to this text. virtual public void SetMarkup(System.String markup) { Efl.ITextMarkupConcrete.NativeMethods.efl_text_markup_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),markup); Eina.Error.RaiseIfUnhandledException(); } /// A unique string to be translated. /// Often this will be a human-readable string (e.g. in English) but it can also be a unique string identifier that must then be translated to the current locale with dgettext() or any similar mechanism. /// /// Setting this property will enable translation for this object or part. /// A translation domain. If null this means the default domain is used. /// This returns the untranslated value of label. The translated string can usually be retrieved with . virtual public System.String GetL10nText(out System.String domain) { var _ret_var = Efl.Ui.IL10nConcrete.NativeMethods.efl_ui_l10n_text_get_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),out domain); Eina.Error.RaiseIfUnhandledException(); return _ret_var; } /// Sets the new untranslated string and domain for this object. /// A unique (untranslated) string. /// A translation domain. If null this uses the default domain (eg. set by textdomain()). virtual public void SetL10nText(System.String label, System.String domain) { Efl.Ui.IL10nConcrete.NativeMethods.efl_ui_l10n_text_set_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),label, domain); Eina.Error.RaiseIfUnhandledException(); } /// Requests this object to update its text strings for the current locale. /// Currently strings are translated with dgettext, so support for this function may depend on the platform. It is up to the application to provide its own translation data. /// /// This function is a hook meant to be implemented by any object that supports translation. This can be called whenever a new object is created or when the current locale changes, for instance. This should only trigger further calls to to children objects. virtual public void UpdateTranslation() { Efl.Ui.IL10nConcrete.NativeMethods.efl_ui_l10n_translation_update_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass))); Eina.Error.RaiseIfUnhandledException(); } /// Markup property /// The markup-text representation set to this text. public System.String Markup { get { return GetMarkup(); } set { SetMarkup(value); } } private static IntPtr GetEflClassStatic() { return Efl.Ui.ItemPartText.efl_ui_item_part_text_class_get(); } /// Wrapper for native methods and virtual method delegates. /// For internal use by generated code only. public new class NativeMethods : Efl.Ui.LayoutPart.NativeMethods { private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Elementary); /// 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_get_static_delegate == null) { efl_text_get_static_delegate = new efl_text_get_delegate(text_get); } if (methods.FirstOrDefault(m => m.Name == "GetText") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_text_get"), func = Marshal.GetFunctionPointerForDelegate(efl_text_get_static_delegate) }); } if (efl_text_set_static_delegate == null) { efl_text_set_static_delegate = new efl_text_set_delegate(text_set); } if (methods.FirstOrDefault(m => m.Name == "SetText") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_text_set"), func = Marshal.GetFunctionPointerForDelegate(efl_text_set_static_delegate) }); } 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) }); } if (efl_ui_l10n_text_get_static_delegate == null) { efl_ui_l10n_text_get_static_delegate = new efl_ui_l10n_text_get_delegate(l10n_text_get); } if (methods.FirstOrDefault(m => m.Name == "GetL10nText") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_l10n_text_get"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_l10n_text_get_static_delegate) }); } if (efl_ui_l10n_text_set_static_delegate == null) { efl_ui_l10n_text_set_static_delegate = new efl_ui_l10n_text_set_delegate(l10n_text_set); } if (methods.FirstOrDefault(m => m.Name == "SetL10nText") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_l10n_text_set"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_l10n_text_set_static_delegate) }); } if (efl_ui_l10n_translation_update_static_delegate == null) { efl_ui_l10n_translation_update_static_delegate = new efl_ui_l10n_translation_update_delegate(translation_update); } if (methods.FirstOrDefault(m => m.Name == "UpdateTranslation") != null) { descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_l10n_translation_update"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_l10n_translation_update_static_delegate) }); } descs.AddRange(base.GetEoOps(type)); return descs; } /// Returns the Eo class for the native methods of this class. /// The native class pointer. public override IntPtr GetEflClass() { return Efl.Ui.ItemPartText.efl_ui_item_part_text_class_get(); } #pragma warning disable CA1707, CS1591, SA1300, SA1600 [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] private delegate System.String efl_text_get_delegate(System.IntPtr obj, System.IntPtr pd); [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] public delegate System.String efl_text_get_api_delegate(System.IntPtr obj); public static Efl.Eo.FunctionWrapper efl_text_get_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_text_get"); private static System.String text_get(System.IntPtr obj, System.IntPtr pd) { Eina.Log.Debug("function efl_text_get was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { System.String _ret_var = default(System.String); try { _ret_var = ((ItemPartText)ws.Target).GetText(); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } return _ret_var; } else { return efl_text_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj))); } } private static efl_text_get_delegate efl_text_get_static_delegate; private delegate void efl_text_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String text); public delegate void efl_text_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String text); public static Efl.Eo.FunctionWrapper efl_text_set_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_text_set"); private static void text_set(System.IntPtr obj, System.IntPtr pd, System.String text) { Eina.Log.Debug("function efl_text_set was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { try { ((ItemPartText)ws.Target).SetText(text); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } else { efl_text_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), text); } } private static efl_text_set_delegate efl_text_set_static_delegate; [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 = ((ItemPartText)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))); } } 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); 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"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { try { ((ItemPartText)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); } } private static efl_text_markup_set_delegate efl_text_markup_set_static_delegate; [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] private delegate System.String efl_ui_l10n_text_get_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] out System.String domain); [return: MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] public delegate System.String efl_ui_l10n_text_get_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] out System.String domain); public static Efl.Eo.FunctionWrapper efl_ui_l10n_text_get_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_ui_l10n_text_get"); private static System.String l10n_text_get(System.IntPtr obj, System.IntPtr pd, out System.String domain) { Eina.Log.Debug("function efl_ui_l10n_text_get was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { System.String _out_domain = default(System.String); System.String _ret_var = default(System.String); try { _ret_var = ((ItemPartText)ws.Target).GetL10nText(out _out_domain); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } domain = _out_domain; return _ret_var; } else { return efl_ui_l10n_text_get_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), out domain); } } private static efl_ui_l10n_text_get_delegate efl_ui_l10n_text_get_static_delegate; private delegate void efl_ui_l10n_text_set_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String label, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String domain); public delegate void efl_ui_l10n_text_set_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String label, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String domain); public static Efl.Eo.FunctionWrapper efl_ui_l10n_text_set_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_ui_l10n_text_set"); private static void l10n_text_set(System.IntPtr obj, System.IntPtr pd, System.String label, System.String domain) { Eina.Log.Debug("function efl_ui_l10n_text_set was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { try { ((ItemPartText)ws.Target).SetL10nText(label, domain); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } else { efl_ui_l10n_text_set_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), label, domain); } } private static efl_ui_l10n_text_set_delegate efl_ui_l10n_text_set_static_delegate; private delegate void efl_ui_l10n_translation_update_delegate(System.IntPtr obj, System.IntPtr pd); public delegate void efl_ui_l10n_translation_update_api_delegate(System.IntPtr obj); public static Efl.Eo.FunctionWrapper efl_ui_l10n_translation_update_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_ui_l10n_translation_update"); private static void translation_update(System.IntPtr obj, System.IntPtr pd) { Eina.Log.Debug("function efl_ui_l10n_translation_update was called"); var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj); if (ws != null) { try { ((ItemPartText)ws.Target).UpdateTranslation(); } catch (Exception e) { Eina.Log.Warning($"Callback error: {e.ToString()}"); Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION); } } else { efl_ui_l10n_translation_update_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj))); } } private static efl_ui_l10n_translation_update_delegate efl_ui_l10n_translation_update_static_delegate; #pragma warning restore CA1707, CS1591, SA1300, SA1600 } } } }