[EflSharp] Update Circle and efl cs files (#819)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_ui_layout_factory.eo.cs
1 #pragma warning disable CS1591
2 using System;
3 using System.Runtime.InteropServices;
4 using System.Collections.Generic;
5 using System.Linq;
6 using System.Threading;
7 using System.ComponentModel;
8 namespace Efl {
9
10 namespace Ui {
11
12 /// <summary>Efl Ui Layout Factory class</summary>
13 [Efl.Ui.LayoutFactory.NativeMethods]
14 public class LayoutFactory : Efl.Ui.CachingFactory, Efl.Eo.IWrapper
15 {
16     ///<summary>Pointer to the native class description.</summary>
17     public override System.IntPtr NativeClass
18     {
19         get
20         {
21             if (((object)this).GetType() == typeof(LayoutFactory))
22             {
23                 return GetEflClassStatic();
24             }
25             else
26             {
27                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
28             }
29         }
30     }
31
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)
39     {
40         if (Efl.Eo.Globals.ParamHelperCheck(itemClass))
41         {
42             SetItemClass(Efl.Eo.Globals.GetParamHelper(itemClass));
43         }
44
45         FinishInstantiation();
46     }
47
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)
52     {
53             }
54
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)
61     {
62     }
63
64     /// <summary>Verifies if the given object is equal to this one.</summary>
65     /// <param name="instance">The object to compare to.</param>
66     /// <returns>True if both objects point to the same native object.</returns>
67     public override bool Equals(object instance)
68     {
69         var other = instance as Efl.Object;
70         if (other == null)
71         {
72             return false;
73         }
74         return this.NativeHandle == other.NativeHandle;
75     }
76
77     /// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>
78     /// <returns>The value of the pointer, to be used as the hash code of this object.</returns>
79     public override int GetHashCode()
80     {
81         return this.NativeHandle.ToInt32();
82     }
83
84     /// <summary>Turns the native pointer into a string representation.</summary>
85     /// <returns>A string with the type and the native pointer for this object.</returns>
86     public override String ToString()
87     {
88         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
89     }
90
91     /// <summary>No description supplied.</summary>
92     /// <param name="klass">The class of the group.</param>
93     /// <param name="group">The group.</param>
94     /// <param name="style">The style to used.</param>
95     virtual public void ThemeConfig(System.String klass, System.String group, System.String style) {
96                                                                                  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);
97         Eina.Error.RaiseIfUnhandledException();
98                                                          }
99     private static IntPtr GetEflClassStatic()
100     {
101         return Efl.Ui.LayoutFactory.efl_ui_layout_factory_class_get();
102     }
103     /// <summary>Wrapper for native methods and virtual method delegates.
104     /// For internal use by generated code only.</summary>
105     public new class NativeMethods : Efl.Ui.CachingFactory.NativeMethods
106     {
107         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Elementary);
108         /// <summary>Gets the list of Eo operations to override.</summary>
109         /// <returns>The list of Eo operations to be overload.</returns>
110         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
111         {
112             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
113             var methods = Efl.Eo.Globals.GetUserMethods(type);
114
115             if (efl_ui_layout_factory_theme_config_static_delegate == null)
116             {
117                 efl_ui_layout_factory_theme_config_static_delegate = new efl_ui_layout_factory_theme_config_delegate(theme_config);
118             }
119
120             if (methods.FirstOrDefault(m => m.Name == "ThemeConfig") != null)
121             {
122                 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) });
123             }
124
125             descs.AddRange(base.GetEoOps(type));
126             return descs;
127         }
128         /// <summary>Returns the Eo class for the native methods of this class.</summary>
129         /// <returns>The native class pointer.</returns>
130         public override IntPtr GetEflClass()
131         {
132             return Efl.Ui.LayoutFactory.efl_ui_layout_factory_class_get();
133         }
134
135         #pragma warning disable CA1707, SA1300, SA1600
136
137         
138         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);
139
140         
141         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);
142
143         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");
144
145         private static void theme_config(System.IntPtr obj, System.IntPtr pd, System.String klass, System.String group, System.String style)
146         {
147             Eina.Log.Debug("function efl_ui_layout_factory_theme_config was called");
148             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
149             if (wrapper != null)
150             {
151                                                                                     
152                 try
153                 {
154                     ((LayoutFactory)wrapper).ThemeConfig(klass, group, style);
155                 }
156                 catch (Exception e)
157                 {
158                     Eina.Log.Warning($"Callback error: {e.ToString()}");
159                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
160                 }
161
162                                                         
163             }
164             else
165             {
166                 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);
167             }
168         }
169
170         private static efl_ui_layout_factory_theme_config_delegate efl_ui_layout_factory_theme_config_static_delegate;
171
172         #pragma warning restore CA1707, SA1300, SA1600
173
174 }
175 }
176 }
177
178 }
179