2 #pragma warning disable CS1591
4 using System.Runtime.InteropServices;
5 using System.Collections.Generic;
7 using System.Threading;
8 using System.ComponentModel;
13 /// <summary>Efl Ui Layout Factory class</summary>
14 /// <remarks>This is a <b>BETA</b> class. It can be modified or removed in the future. Do not use it for product development.</remarks>
15 [Efl.Ui.LayoutFactory.NativeMethods]
16 [Efl.Eo.BindingEntity]
17 public class LayoutFactory : Efl.Ui.CachingFactory
19 /// <summary>Pointer to the native class description.</summary>
20 public override System.IntPtr NativeClass
24 if (((object)this).GetType() == typeof(LayoutFactory))
26 return GetEflClassStatic();
30 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
35 [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
36 efl_ui_layout_factory_class_get();
37 /// <summary>Initializes a new instance of the <see cref="LayoutFactory"/> class.</summary>
38 /// <param name="parent">Parent instance.</param>
39 /// <param name="itemClass">Define the class of the item returned by this factory. See <see cref="Efl.Ui.WidgetFactory.SetItemClass" /></param>
40 public LayoutFactory(Efl.Object parent
41 , Type itemClass = null) : base(efl_ui_layout_factory_class_get(), parent)
43 if (Efl.Eo.Globals.ParamHelperCheck(itemClass))
45 SetItemClass(Efl.Eo.Globals.GetParamHelper(itemClass));
48 FinishInstantiation();
51 /// <summary>Subclasses should override this constructor if they are expected to be instantiated from native code.
52 /// Do not call this constructor directly.</summary>
53 /// <param name="ch">Tag struct storing the native handle of the object being constructed.</param>
54 protected LayoutFactory(ConstructingHandle ch) : base(ch)
58 /// <summary>Initializes a new instance of the <see cref="LayoutFactory"/> class.
59 /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
60 /// <param name="wh">The native pointer to be wrapped.</param>
61 protected LayoutFactory(Efl.Eo.Globals.WrappingHandle wh) : base(wh)
65 /// <summary>Initializes a new instance of the <see cref="LayoutFactory"/> class.
66 /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
67 /// <param name="baseKlass">The pointer to the base native Eo class.</param>
68 /// <param name="parent">The Efl.Object parent of this instance.</param>
69 protected LayoutFactory(IntPtr baseKlass, Efl.Object parent) : base(baseKlass, parent)
73 /// <summary>No description supplied.</summary>
74 /// <param name="klass">The class of the group.</param>
75 /// <param name="group">The group.</param>
76 /// <param name="style">The style to used.</param>
77 virtual public void ThemeConfig(System.String klass, System.String group, System.String style) {
78 Efl.Ui.LayoutFactory.NativeMethods.efl_ui_layout_factory_theme_config_ptr.Value.Delegate((IsGeneratedBindingClass ? this.NativeHandle : Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass)),klass, group, style);
79 Eina.Error.RaiseIfUnhandledException();
81 private static IntPtr GetEflClassStatic()
83 return Efl.Ui.LayoutFactory.efl_ui_layout_factory_class_get();
85 /// <summary>Wrapper for native methods and virtual method delegates.
86 /// For internal use by generated code only.</summary>
87 public new class NativeMethods : Efl.Ui.CachingFactory.NativeMethods
89 private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule( efl.Libs.Elementary);
90 /// <summary>Gets the list of Eo operations to override.</summary>
91 /// <returns>The list of Eo operations to be overload.</returns>
92 public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
94 var descs = new System.Collections.Generic.List<Efl_Op_Description>();
95 var methods = Efl.Eo.Globals.GetUserMethods(type);
97 if (efl_ui_layout_factory_theme_config_static_delegate == null)
99 efl_ui_layout_factory_theme_config_static_delegate = new efl_ui_layout_factory_theme_config_delegate(theme_config);
102 if (methods.FirstOrDefault(m => m.Name == "ThemeConfig") != null)
104 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) });
107 descs.AddRange(base.GetEoOps(type));
110 /// <summary>Returns the Eo class for the native methods of this class.</summary>
111 /// <returns>The native class pointer.</returns>
112 public override IntPtr GetEflClass()
114 return Efl.Ui.LayoutFactory.efl_ui_layout_factory_class_get();
117 #pragma warning disable CA1707, CS1591, SA1300, SA1600
120 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);
123 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);
125 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");
127 private static void theme_config(System.IntPtr obj, System.IntPtr pd, System.String klass, System.String group, System.String style)
129 Eina.Log.Debug("function efl_ui_layout_factory_theme_config was called");
130 var ws = Efl.Eo.Globals.GetWrapperSupervisor(obj);
136 ((LayoutFactory)ws.Target).ThemeConfig(klass, group, style);
140 Eina.Log.Warning($"Callback error: {e.ToString()}");
141 Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
148 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);
152 private static efl_ui_layout_factory_theme_config_delegate efl_ui_layout_factory_theme_config_static_delegate;
154 #pragma warning restore CA1707, CS1591, SA1300, SA1600
163 #pragma warning disable CS1591
164 public static class Efl_UiLayoutFactory_ExtensionMethods {
166 #pragma warning restore CS1591