[EflSharp] Update Circle and efl cs files (#819)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_ui_theme.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 Theme class</summary>
13 [Efl.Ui.Theme.NativeMethods]
14 public class Theme : Efl.Object, 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(Theme))
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_theme_class_get();
34     /// <summary>Initializes a new instance of the <see cref="Theme"/> class.</summary>
35     /// <param name="parent">Parent instance.</param>
36     public Theme(Efl.Object parent= null
37             ) : base(efl_ui_theme_class_get(), typeof(Theme), parent)
38     {
39         FinishInstantiation();
40     }
41
42     /// <summary>Initializes a new instance of the <see cref="Theme"/> class.
43     /// Internal usage: Constructs an instance from a native pointer. This is used when interacting with C code and should not be used directly.</summary>
44     /// <param name="raw">The native pointer to be wrapped.</param>
45     protected Theme(System.IntPtr raw) : base(raw)
46     {
47             }
48
49     /// <summary>Initializes a new instance of the <see cref="Theme"/> class.
50     /// Internal usage: Constructor to forward the wrapper initialization to the root class that interfaces with native code. Should not be used directly.</summary>
51     /// <param name="baseKlass">The pointer to the base native Eo class.</param>
52     /// <param name="managedType">The managed type of the public constructor that originated this call.</param>
53     /// <param name="parent">The Efl.Object parent of this instance.</param>
54     protected Theme(IntPtr baseKlass, System.Type managedType, Efl.Object parent) : base(baseKlass, managedType, parent)
55     {
56     }
57
58     /// <summary>Verifies if the given object is equal to this one.</summary>
59     /// <param name="instance">The object to compare to.</param>
60     /// <returns>True if both objects point to the same native object.</returns>
61     public override bool Equals(object instance)
62     {
63         var other = instance as Efl.Object;
64         if (other == null)
65         {
66             return false;
67         }
68         return this.NativeHandle == other.NativeHandle;
69     }
70
71     /// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>
72     /// <returns>The value of the pointer, to be used as the hash code of this object.</returns>
73     public override int GetHashCode()
74     {
75         return this.NativeHandle.ToInt32();
76     }
77
78     /// <summary>Turns the native pointer into a string representation.</summary>
79     /// <returns>A string with the type and the native pointer for this object.</returns>
80     public override String ToString()
81     {
82         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
83     }
84
85     /// <summary>Gets the default theme handle.</summary>
86     /// <returns>The default theme handle</returns>
87     public static Efl.Ui.Theme GetDefault() {
88          var _ret_var = Efl.Ui.Theme.NativeMethods.efl_ui_theme_default_get_ptr.Value.Delegate();
89         Eina.Error.RaiseIfUnhandledException();
90         return _ret_var;
91  }
92     /// <summary>Appends a theme extension to the list of extensions. This is intended when an application needs more styles of widgets or new widget themes that the default does not provide (or may not provide). The application has &quot;extended&quot; usage by coming up with new custom style names for widgets for specific uses, but as these are not &quot;standard&quot;, they are not guaranteed to be provided by a default theme. This means the application is required to provide these extra elements itself in specific Edje files. This call adds one of those Edje files to the theme search path to be searched after the default theme. The use of this call is encouraged when default styles do not meet the needs of the application. Use this call instead of <see cref="Efl.Ui.Theme.AddOverlay"/> for almost all cases.</summary>
93     /// <param name="item">The Edje file path to be used</param>
94     virtual public void AddExtension(System.String item) {
95                                  Efl.Ui.Theme.NativeMethods.efl_ui_theme_extension_add_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),item);
96         Eina.Error.RaiseIfUnhandledException();
97                          }
98     /// <summary>Deletes a theme extension from the list of extensions.</summary>
99     /// <param name="item">The Edje file path not to be used</param>
100     virtual public void DelExtension(System.String item) {
101                                  Efl.Ui.Theme.NativeMethods.efl_ui_theme_extension_del_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),item);
102         Eina.Error.RaiseIfUnhandledException();
103                          }
104     /// <summary>Prepends a theme overlay to the list of overlays. Use this if your application needs to provide some custom overlay theme (An Edje file that replaces some default styles of widgets) where adding new styles, or changing system theme configuration is not possible. Do NOT use this instead of a proper system theme configuration. Use proper configuration files, profiles, environment variables etc. to set a theme so that the theme can be altered by simple configuration by a user. Using this call to achieve that effect is abusing the API and will create lots of trouble.</summary>
105     /// <param name="item">The Edje file path to be used</param>
106     virtual public void AddOverlay(System.String item) {
107                                  Efl.Ui.Theme.NativeMethods.efl_ui_theme_overlay_add_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),item);
108         Eina.Error.RaiseIfUnhandledException();
109                          }
110     /// <summary>Delete a theme overlay from the list of overlays.</summary>
111     /// <param name="item">The Edje file path not to be used</param>
112     virtual public void DelOverlay(System.String item) {
113                                  Efl.Ui.Theme.NativeMethods.efl_ui_theme_overlay_del_ptr.Value.Delegate((inherited ? Efl.Eo.Globals.efl_super(this.NativeHandle, this.NativeClass) : this.NativeHandle),item);
114         Eina.Error.RaiseIfUnhandledException();
115                          }
116     /// <summary>This is the default theme.
117 /// All widgets use the default theme implicitly unless a specific theme is set.</summary>
118 /// <value>The default theme handle</value>
119     public static Efl.Ui.Theme Default {
120         get { return GetDefault(); }
121     }
122     private static IntPtr GetEflClassStatic()
123     {
124         return Efl.Ui.Theme.efl_ui_theme_class_get();
125     }
126     /// <summary>Wrapper for native methods and virtual method delegates.
127     /// For internal use by generated code only.</summary>
128     public new class NativeMethods : Efl.Object.NativeMethods
129     {
130         private static Efl.Eo.NativeModule Module = new Efl.Eo.NativeModule(    efl.Libs.Elementary);
131         /// <summary>Gets the list of Eo operations to override.</summary>
132         /// <returns>The list of Eo operations to be overload.</returns>
133         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
134         {
135             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
136             var methods = Efl.Eo.Globals.GetUserMethods(type);
137
138             if (efl_ui_theme_extension_add_static_delegate == null)
139             {
140                 efl_ui_theme_extension_add_static_delegate = new efl_ui_theme_extension_add_delegate(extension_add);
141             }
142
143             if (methods.FirstOrDefault(m => m.Name == "AddExtension") != null)
144             {
145                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_theme_extension_add"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_theme_extension_add_static_delegate) });
146             }
147
148             if (efl_ui_theme_extension_del_static_delegate == null)
149             {
150                 efl_ui_theme_extension_del_static_delegate = new efl_ui_theme_extension_del_delegate(extension_del);
151             }
152
153             if (methods.FirstOrDefault(m => m.Name == "DelExtension") != null)
154             {
155                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_theme_extension_del"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_theme_extension_del_static_delegate) });
156             }
157
158             if (efl_ui_theme_overlay_add_static_delegate == null)
159             {
160                 efl_ui_theme_overlay_add_static_delegate = new efl_ui_theme_overlay_add_delegate(overlay_add);
161             }
162
163             if (methods.FirstOrDefault(m => m.Name == "AddOverlay") != null)
164             {
165                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_theme_overlay_add"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_theme_overlay_add_static_delegate) });
166             }
167
168             if (efl_ui_theme_overlay_del_static_delegate == null)
169             {
170                 efl_ui_theme_overlay_del_static_delegate = new efl_ui_theme_overlay_del_delegate(overlay_del);
171             }
172
173             if (methods.FirstOrDefault(m => m.Name == "DelOverlay") != null)
174             {
175                 descs.Add(new Efl_Op_Description() {api_func = Efl.Eo.FunctionInterop.LoadFunctionPointer(Module.Module, "efl_ui_theme_overlay_del"), func = Marshal.GetFunctionPointerForDelegate(efl_ui_theme_overlay_del_static_delegate) });
176             }
177
178             descs.AddRange(base.GetEoOps(type));
179             return descs;
180         }
181         /// <summary>Returns the Eo class for the native methods of this class.</summary>
182         /// <returns>The native class pointer.</returns>
183         public override IntPtr GetEflClass()
184         {
185             return Efl.Ui.Theme.efl_ui_theme_class_get();
186         }
187
188         #pragma warning disable CA1707, SA1300, SA1600
189
190         [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))]
191         private delegate Efl.Ui.Theme efl_ui_theme_default_get_delegate();
192
193         [return:MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.MarshalEo<Efl.Eo.NonOwnTag>))]
194         public delegate Efl.Ui.Theme efl_ui_theme_default_get_api_delegate();
195
196         public static Efl.Eo.FunctionWrapper<efl_ui_theme_default_get_api_delegate> efl_ui_theme_default_get_ptr = new Efl.Eo.FunctionWrapper<efl_ui_theme_default_get_api_delegate>(Module, "efl_ui_theme_default_get");
197
198         private static Efl.Ui.Theme default_get(System.IntPtr obj, System.IntPtr pd)
199         {
200             Eina.Log.Debug("function efl_ui_theme_default_get was called");
201             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
202             if (wrapper != null)
203             {
204             Efl.Ui.Theme _ret_var = default(Efl.Ui.Theme);
205                 try
206                 {
207                     _ret_var = Theme.GetDefault();
208                 }
209                 catch (Exception e)
210                 {
211                     Eina.Log.Warning($"Callback error: {e.ToString()}");
212                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
213                 }
214
215         return _ret_var;
216
217             }
218             else
219             {
220                 return efl_ui_theme_default_get_ptr.Value.Delegate();
221             }
222         }
223
224         
225         private delegate void efl_ui_theme_extension_add_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String item);
226
227         
228         public delegate void efl_ui_theme_extension_add_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String item);
229
230         public static Efl.Eo.FunctionWrapper<efl_ui_theme_extension_add_api_delegate> efl_ui_theme_extension_add_ptr = new Efl.Eo.FunctionWrapper<efl_ui_theme_extension_add_api_delegate>(Module, "efl_ui_theme_extension_add");
231
232         private static void extension_add(System.IntPtr obj, System.IntPtr pd, System.String item)
233         {
234             Eina.Log.Debug("function efl_ui_theme_extension_add was called");
235             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
236             if (wrapper != null)
237             {
238                                     
239                 try
240                 {
241                     ((Theme)wrapper).AddExtension(item);
242                 }
243                 catch (Exception e)
244                 {
245                     Eina.Log.Warning($"Callback error: {e.ToString()}");
246                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
247                 }
248
249                         
250             }
251             else
252             {
253                 efl_ui_theme_extension_add_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), item);
254             }
255         }
256
257         private static efl_ui_theme_extension_add_delegate efl_ui_theme_extension_add_static_delegate;
258
259         
260         private delegate void efl_ui_theme_extension_del_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String item);
261
262         
263         public delegate void efl_ui_theme_extension_del_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String item);
264
265         public static Efl.Eo.FunctionWrapper<efl_ui_theme_extension_del_api_delegate> efl_ui_theme_extension_del_ptr = new Efl.Eo.FunctionWrapper<efl_ui_theme_extension_del_api_delegate>(Module, "efl_ui_theme_extension_del");
266
267         private static void extension_del(System.IntPtr obj, System.IntPtr pd, System.String item)
268         {
269             Eina.Log.Debug("function efl_ui_theme_extension_del was called");
270             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
271             if (wrapper != null)
272             {
273                                     
274                 try
275                 {
276                     ((Theme)wrapper).DelExtension(item);
277                 }
278                 catch (Exception e)
279                 {
280                     Eina.Log.Warning($"Callback error: {e.ToString()}");
281                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
282                 }
283
284                         
285             }
286             else
287             {
288                 efl_ui_theme_extension_del_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), item);
289             }
290         }
291
292         private static efl_ui_theme_extension_del_delegate efl_ui_theme_extension_del_static_delegate;
293
294         
295         private delegate void efl_ui_theme_overlay_add_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String item);
296
297         
298         public delegate void efl_ui_theme_overlay_add_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String item);
299
300         public static Efl.Eo.FunctionWrapper<efl_ui_theme_overlay_add_api_delegate> efl_ui_theme_overlay_add_ptr = new Efl.Eo.FunctionWrapper<efl_ui_theme_overlay_add_api_delegate>(Module, "efl_ui_theme_overlay_add");
301
302         private static void overlay_add(System.IntPtr obj, System.IntPtr pd, System.String item)
303         {
304             Eina.Log.Debug("function efl_ui_theme_overlay_add was called");
305             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
306             if (wrapper != null)
307             {
308                                     
309                 try
310                 {
311                     ((Theme)wrapper).AddOverlay(item);
312                 }
313                 catch (Exception e)
314                 {
315                     Eina.Log.Warning($"Callback error: {e.ToString()}");
316                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
317                 }
318
319                         
320             }
321             else
322             {
323                 efl_ui_theme_overlay_add_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), item);
324             }
325         }
326
327         private static efl_ui_theme_overlay_add_delegate efl_ui_theme_overlay_add_static_delegate;
328
329         
330         private delegate void efl_ui_theme_overlay_del_delegate(System.IntPtr obj, System.IntPtr pd, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String item);
331
332         
333         public delegate void efl_ui_theme_overlay_del_api_delegate(System.IntPtr obj, [MarshalAs(UnmanagedType.CustomMarshaler, MarshalTypeRef=typeof(Efl.Eo.StringKeepOwnershipMarshaler))] System.String item);
334
335         public static Efl.Eo.FunctionWrapper<efl_ui_theme_overlay_del_api_delegate> efl_ui_theme_overlay_del_ptr = new Efl.Eo.FunctionWrapper<efl_ui_theme_overlay_del_api_delegate>(Module, "efl_ui_theme_overlay_del");
336
337         private static void overlay_del(System.IntPtr obj, System.IntPtr pd, System.String item)
338         {
339             Eina.Log.Debug("function efl_ui_theme_overlay_del was called");
340             Efl.Eo.IWrapper wrapper = Efl.Eo.Globals.PrivateDataGet(pd);
341             if (wrapper != null)
342             {
343                                     
344                 try
345                 {
346                     ((Theme)wrapper).DelOverlay(item);
347                 }
348                 catch (Exception e)
349                 {
350                     Eina.Log.Warning($"Callback error: {e.ToString()}");
351                     Eina.Error.Set(Eina.Error.UNHANDLED_EXCEPTION);
352                 }
353
354                         
355             }
356             else
357             {
358                 efl_ui_theme_overlay_del_ptr.Value.Delegate(Efl.Eo.Globals.efl_super(obj, Efl.Eo.Globals.efl_class_get(obj)), item);
359             }
360         }
361
362         private static efl_ui_theme_overlay_del_delegate efl_ui_theme_overlay_del_static_delegate;
363
364         #pragma warning restore CA1707, SA1300, SA1600
365
366 }
367 }
368 }
369
370 }
371