[EflSharp] Update Circle and efl cs files (#819)
[platform/core/csapi/tizenfx.git] / internals / src / EflSharp / EflSharp / efl / efl_ui_legacy.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>The bg (background) widget is used for setting (solid) background decorations
13 /// in a window (unless it has transparency enabled) or on any container object. It works just like an image but has some properties useful for backgrounds, such as setting it to tiled, centered, scaled or stretched.</summary>
14 [Efl.Ui.ILegacyConcrete.NativeMethods]
15 public interface ILegacy : 
16     Efl.Eo.IWrapper, IDisposable
17 {
18 }
19 /// <summary>The bg (background) widget is used for setting (solid) background decorations
20 /// in a window (unless it has transparency enabled) or on any container object. It works just like an image but has some properties useful for backgrounds, such as setting it to tiled, centered, scaled or stretched.</summary>
21 sealed public class ILegacyConcrete : 
22
23 ILegacy
24     
25 {
26     ///<summary>Pointer to the native class description.</summary>
27     public System.IntPtr NativeClass
28     {
29         get
30         {
31             if (((object)this).GetType() == typeof(ILegacyConcrete))
32             {
33                 return GetEflClassStatic();
34             }
35             else
36             {
37                 return Efl.Eo.ClassRegister.klassFromType[((object)this).GetType()];
38             }
39         }
40     }
41
42     private  System.IntPtr handle;
43     ///<summary>Pointer to the native instance.</summary>
44     public System.IntPtr NativeHandle
45     {
46         get { return handle; }
47     }
48
49     [System.Runtime.InteropServices.DllImport(efl.Libs.Elementary)] internal static extern System.IntPtr
50         efl_ui_legacy_interface_get();
51     /// <summary>Initializes a new instance of the <see cref="ILegacy"/> class.
52     /// Internal usage: This is used when interacting with C code and should not be used directly.</summary>
53     private ILegacyConcrete(System.IntPtr raw)
54     {
55         handle = raw;
56     }
57     ///<summary>Destructor.</summary>
58     ~ILegacyConcrete()
59     {
60         Dispose(false);
61     }
62
63     ///<summary>Releases the underlying native instance.</summary>
64     private void Dispose(bool disposing)
65     {
66         if (handle != System.IntPtr.Zero)
67         {
68             IntPtr h = handle;
69             handle = IntPtr.Zero;
70
71             IntPtr gcHandlePtr = IntPtr.Zero;
72             if (disposing)
73             {
74                 Efl.Eo.Globals.efl_mono_native_dispose(h, gcHandlePtr);
75             }
76             else
77             {
78                 Monitor.Enter(Efl.All.InitLock);
79                 if (Efl.All.MainLoopInitialized)
80                 {
81                     Efl.Eo.Globals.efl_mono_thread_safe_native_dispose(h, gcHandlePtr);
82                 }
83
84                 Monitor.Exit(Efl.All.InitLock);
85             }
86         }
87
88     }
89
90     ///<summary>Releases the underlying native instance.</summary>
91     public void Dispose()
92     {
93         Dispose(true);
94         GC.SuppressFinalize(this);
95     }
96
97     /// <summary>Verifies if the given object is equal to this one.</summary>
98     /// <param name="instance">The object to compare to.</param>
99     /// <returns>True if both objects point to the same native object.</returns>
100     public override bool Equals(object instance)
101     {
102         var other = instance as Efl.Object;
103         if (other == null)
104         {
105             return false;
106         }
107         return this.NativeHandle == other.NativeHandle;
108     }
109
110     /// <summary>Gets the hash code for this object based on the native pointer it points to.</summary>
111     /// <returns>The value of the pointer, to be used as the hash code of this object.</returns>
112     public override int GetHashCode()
113     {
114         return this.NativeHandle.ToInt32();
115     }
116
117     /// <summary>Turns the native pointer into a string representation.</summary>
118     /// <returns>A string with the type and the native pointer for this object.</returns>
119     public override String ToString()
120     {
121         return $"{this.GetType().Name}@[{this.NativeHandle.ToInt32():x}]";
122     }
123
124     private static IntPtr GetEflClassStatic()
125     {
126         return Efl.Ui.ILegacyConcrete.efl_ui_legacy_interface_get();
127     }
128     /// <summary>Wrapper for native methods and virtual method delegates.
129     /// For internal use by generated code only.</summary>
130     public class NativeMethods  : Efl.Eo.NativeClass
131     {
132         /// <summary>Gets the list of Eo operations to override.</summary>
133         /// <returns>The list of Eo operations to be overload.</returns>
134         public override System.Collections.Generic.List<Efl_Op_Description> GetEoOps(System.Type type)
135         {
136             var descs = new System.Collections.Generic.List<Efl_Op_Description>();
137             return descs;
138         }
139         /// <summary>Returns the Eo class for the native methods of this class.</summary>
140         /// <returns>The native class pointer.</returns>
141         public override IntPtr GetEflClass()
142         {
143             return Efl.Ui.ILegacyConcrete.efl_ui_legacy_interface_get();
144         }
145
146         #pragma warning disable CA1707, SA1300, SA1600
147
148         #pragma warning restore CA1707, SA1300, SA1600
149
150 }
151 }
152 }
153
154 }
155