1 #pragma warning disable CS1591
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
6 using System.Threading;
7 using System.ComponentModel;
12 /// <summary>Efl Ui Layout Factory class</summary>
13 [Efl.Ui.LayoutFactory.NativeMethods]
14 public class LayoutFactory : Efl.Ui.CachingFactory
16 ///<summary>Pointer to the native class description.</summary>
17 public override System.IntPtr NativeClass
21 if (((object)this).GetType() == typeof(LayoutFactory))
23 return GetEflClassStatic();
27 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
32 [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
33 efl_ui_layout_factory_class_get();
34 /// <summary>Initializes a new instance of the <see cref="LayoutFactory"/> class.</summary>
35 /// <param name="parent">Parent instance.</param>
36 /// <param name="itemClass">Define the class of the item returned by this factory. See <see cref="Efl.Ui.WidgetFactory.SetItemClass"/></param>
37 public LayoutFactory(Efl.Object parent
38 , Type itemClass = null) : base(efl_ui_layout_factory_class_get(), typeof(LayoutFactory), parent)
40 if (Efl.Eo.Globals.ParamHelperCheck(itemClass))
42 SetItemClass(Efl.Eo.Globals.GetParamHelper(itemClass));
45 FinishInstantiation();
48 /// <summary>Initializes a new instance of the <see cref="LayoutFactory"/> class.
49 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
50 /// <param name="raw">The native pointer to be wrapped.</param>
51 protected LayoutFactory(System.IntPtr raw) : base(raw)
55 /// <summary>Initializes a new instance of the <see cref="LayoutFactory"/> class.
56 /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
57 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
58 /// <param name="managedType">The managed type of the public constructor that originated this call.</param>
59 /// <param name="parent">The Efl.Object parent of this instance.</param>
60 protected LayoutFactory(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
64 /// <summary>No description supplied.</summary>
65 /// <param name="klass">The class of the group.</param>
66 /// <param name="group">The group.</param>
67 /// <param name="style">The style to used.</param>
68 virtual public void ThemeConfig(System.String klass, System.String group, System.String style) {
69 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);
70 Eina.Error.RaiseIfUnhandledException();
72 private static IntPtr GetEflClassStatic()
74 return Efl.Ui.LayoutFactory.efl_ui_layout_factory_class_get();
76 /// <summary>Wrapper for native methods and virtual method delegates.
77 /// For internal use by generated code only.</summary>
78 public new class NativeMethods : Efl.Ui.CachingFactory.NativeMethods
80 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Elementary);
81 /// <summary>Gets the list of Eo operations to override.</summary>
82 /// <returns>The list of Eo operations to be overload.</returns>
83 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
85 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
86 var methods = Efl.Eo.Globals.GetUserMethods(type);
88 if (efl_ui_layout_factory_theme_config_static_delegate == null)
90 efl_ui_layout_factory_theme_config_static_delegate = new efl_ui_layout_factory_theme_config_delegate(theme_config);
93 if (methods.FirstOrDefault(m => m.Name == "ThemeConfig") != null)
95 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) });
98 descs.AddRange(base.GetEoOps(type));
101 /// <summary>Returns the Eo class for the native methods of this class.</summary>
102 /// <returns>The native class pointer.</returns>
103 public override IntPtr GetEflClass()
105 return Efl.Ui.LayoutFactory.efl_ui_layout_factory_class_get();
108 #pragma warning disable CA1707, CS1591, SA1300, SA1600
111 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);
114 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);
116 public static Efl.Eo.FunctionWrapper<efl_ui_layout_factory_theme_config_api_delegate> efl_ui_layout_factory_theme_config_ptr = new Efl.Eo.FunctionWrapper<efl_ui_layout_factory_theme_config_api_delegate>(Module, "efl_ui_layout_factory_theme_config");
118 private static void theme_config(System.IntPtr obj, System.IntPtr pd, System.String klass, System.String group, System.String style)
120 Eina.Log.Debug("function efl_ui_layout_factory_theme_config was called");
121 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
127 ((LayoutFactory)ws.Target).ThemeConfig(klass, group, style);
131 Eina.Log.Warning($"Callback error: {e.ToString()}");
132 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
139 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);
143 private static efl_ui_layout_factory_theme_config_delegate efl_ui_layout_factory_theme_config_static_delegate;
145 #pragma warning restore CA1707, CS1591, SA1300, SA1600