#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 {
/// Efl Ui Layout Factory class
[Efl.Ui.LayoutFactory.NativeMethods]
public class LayoutFactory : Efl.Ui.CachingFactory, Efl.Eo.IWrapper
{
///Pointer to the native class description.
public override System.IntPtr NativeClass
{
get
{
if (((object)this).GetType() == typeof(LayoutFactory))
{
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_layout_factory_class_get();
/// Initializes a new instance of the class.
/// Parent instance.
/// Define the class of the item returned by this factory. See
public LayoutFactory(Efl.Object parent
, Type itemClass = null) : base(efl_ui_layout_factory_class_get(), typeof(LayoutFactory), parent)
{
if (Efl.Eo.Globals.ParamHelperCheck(itemClass))
{
SetItemClass(Efl.Eo.Globals.GetParamHelper(itemClass));
}
FinishInstantiation();
}
/// 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 LayoutFactory(System.IntPtr raw) : base(raw)
{
}
/// 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 managed type of the public constructor that originated this call.
/// The Efl.Object parent of this instance.
protected LayoutFactory(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
{
}
/// Verifies if the given object is equal to this one.
/// The object to compare to.
/// True if both objects point to the same native object.
public override bool Equals(object instance)
{
var other = instance 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.
/// The value of the pointer, to be used as the hash code of this object.
public override int GetHashCode()
{
return this.NativeHandle.ToInt32();
}
/// Turns the native pointer into a string representation.
/// A string with the type and the native pointer for this object.
public override String ToString()
{
return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
}
/// No description supplied.
/// The class of the group.
/// The group.
/// The style to used.
virtual public void ThemeConfig(System.String klass, System.String group, System.String style) {
Efl.Ui.LayoutFactory.NativeMethods.efl_ui_layout_factory_theme_config_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),klass, group, style);
Eina.Error.RaiseIfUnhandledException();
}
private static IntPtr GetEflClassStatic()
{
return Efl.Ui.LayoutFactory.efl_ui_layout_factory_class_get();
}
/// Wrapper for native methods and virtual method delegates.
/// For internal use by generated code only.
public new class NativeMethods : Efl.Ui.CachingFactory.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_ui_layout_factory_theme_config_static_delegate == null)
{
efl_ui_layout_factory_theme_config_static_delegate = new efl_ui_layout_factory_theme_config_delegate(theme_config);
}
if (methods.FirstOrDefault(m => m.Name == "ThemeConfig") != null)
{
descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_layout_factory_theme_config"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_layout_factory_theme_config_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.LayoutFactory.efl_ui_layout_factory_class_get();
}
#pragma warning disable CA1707, SA1300, SA1600
private delegate void efl_ui_layout_factory_theme_config_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String klass, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String group, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String style);
public delegate void efl_ui_layout_factory_theme_config_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String klass, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String group, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String style);
public static Efl.Eo.FunctionWrapper efl_ui_layout_factory_theme_config_ptr = new Efl.Eo.FunctionWrapper(Module, "efl_ui_layout_factory_theme_config");
private static void theme_config(System.IntPtr obj, System.IntPtr pd, System.String klass, System.String group, System.String style)
{
Eina.Log.Debug("function efl_ui_layout_factory_theme_config was called");
Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
if (wrapper != null)
{
try
{
((LayoutFactory)wrapper).ThemeConfig(klass, group, style);
}
catch (Exception e)
{
Eina.Log.Warning($"Callback error: {e.ToString()}");
Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
}
}
else
{
efl_ui_layout_factory_theme_config_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), klass, group, style);
}
}
private static efl_ui_layout_factory_theme_config_delegate efl_ui_layout_factory_theme_config_static_delegate;
#pragma warning restore CA1707, SA1300, SA1600
}
}
}
}